An open API service indexing awesome lists of open source software.

https://github.com/deeplearnphysics/pytorch-resnet-example

Resnet example that trains on the 5-particle practice data
https://github.com/deeplearnphysics/pytorch-resnet-example

python pytorch resnet

Last synced: 8 months ago
JSON representation

Resnet example that trains on the 5-particle practice data

Awesome Lists containing this project

README

          

# PyTorch 5-particle Classifier Example

Example of training using on 5-particle practice sample

### Training

To run the training, first setup the requirements (below) and then run

python main.py

### Plotting

Plotting training and results coming in future scripts.

### Requirements

* pytorch, of course
* ROOT6
* LArCV2
* pytorch interface, [LArCVDataset](https://github.com/DeepLearnPhysics/larcvdataset)

Also, download the training and validation sets from the [open data webpage](http://deeplearnphysics.org/DataChallenge/)

* [Training](http://www.stanford.edu/~kterao/public_data/v0.1.0/2d/classification/five_particles/practice_train_5k.root)
* [Validation](http://www.stanford.edu/~kterao/public_data/v0.1.0/2d/classification/five_particles/practice_test_5k.root)

Note: as it stands, network learns, but overtrains. Working on setting proper meta-parameters and/or adding data-augmentation.

Also, you might need to set the GPU device ID in the shell. For example, to set to device `1`,

export CUDA_VISIBLE_DEVICES=1

### Sources

* `main.py` derives from the pytorch examples [repo](https://github.com/pytorch/examples/blob/master/imagenet/main.py)
* `resnet_example.py` is modified from the pytorch torchvision models resnet module