szagoruyko / wide-residual-networks

3.8% and 18.3% on CIFAR-10 and CIFAR-100
http://arxiv.org/abs/1605.07146
BSD 2-Clause "Simplified" License
1.3k stars 293 forks source link

TypeError: forward() missing 1 required positional argument: 'target_gpus' #47

Closed nbansal90 closed 6 years ago

nbansal90 commented 6 years ago

Running the Following Command for code in pytorch directory: python main.py --save ./ --depth 28 --width 10 --ngpu 2 --gpu_id 3,4

Dataset is downloaded!

Getting the Following error: Traceback (most recent call last): File "main.py", line 212, in main() File "main.py", line 208, in main engine.train(h, train_loader, opt.epochs, optimizer) File "/usr/local/torch3/lib/python3.5/site-packages/torchnet/engine/engine.py", line 39, in train state['optimizer'].step(closure) File "/usr/local/torch3/lib/python3.5/site-packages/torch/optim/sgd.py", line 73, in step loss = closure() File "/usr/local/torch3/lib/python3.5/site-packages/torchnet/engine/engine.py", line 28, in closure loss, output = state'network' File "main.py", line 141, in h y = data_parallel(f, inputs, params, stats, sample[2], np.arange(opt.ngpu)) File "/home/bansa01/pytorch_wideres/utils.py", line 50, in data_parallel params_replicas = replicate(params, lambda x: Broadcast(device_ids)(x)) File "/home/bansa01/pytorch_wideres/utils.py", line 46, in replicate for i,u in enumerate(g(v)): File "/home/bansa01/pytorch_wideres/utils.py", line 50, in params_replicas = replicate(params, lambda x: Broadcast(device_ids)(x)) TypeError: forward() missing 1 required positional argument: 'target_gpus'

Am I Missing something here? Thank You!