pytorch-classification icon indicating copy to clipboard operation
pytorch-classification copied to clipboard

Fixes an error when training wide_resnet50_2.

Open jtrobec opened this issue 4 years ago • 0 comments

Ran into this error when attempting to run training for wide_resnet50_2 as part of UC Berkeley MIDS program W251 class. Seems like a simple copy/paste accident or something, once I did this training proceeded as expected.

root@jtrobec-xavier-02:/jetson-inference/python/training/classification# time python3 train.py --epochs=100 --arch=wide_resnet50_2 --model-dir=models/plants data/PlantCLEF_Subset

Use GPU: 0 for training => dataset classes: 20 ['ash', 'beech', 'cattail', 'cedar', 'clover', 'cyprus', 'daisy', 'dandelion', 'dogwood', 'elm', 'fern', 'fig', 'fir', 'juniper', 'maple', 'poison_ivy', 'sweetgum', 'sycamore', 'trout_lily', 'tulip_tree'] => using pre-trained model 'wide_resnet50_2' Namespace(arch='wide_resnet50_2', batch_size=8, data='data/PlantCLEF_Subset', dist_backend='nccl', dist_url='tcp://224.66.41.62:23456', distributed=False, epochs=100, evaluate=False, gpu=0, lr=0.1, model_dir='models/plants', momentum=0.9, multiprocessing_distributed=False, pretrained=True, print_freq=10, rank=-1, resolution=299, resume='', seed=None, start_epoch=0, weight_decay=0.0001, workers=2, world_size=-1) Traceback (most recent call last): File "train.py", line 507, in main() File "train.py", line 135, in main main_worker(args.gpu, ngpus_per_node, args) File "train.py", line 206, in main_worker model = reshape_model(model, args.arch, num_classes) File "/jetson-inference/python/training/classification/reshape.py", line 55, in reshape_model print("classifier reshaping not supported for " + args.arch) NameError: name 'args' is not defined

jtrobec avatar Dec 05 '20 16:12 jtrobec