Hi,
I am currently using examples/main.py at master · pytorch/examples (github.com) for multiprocessing startup for my code. I used the below line to print my gradients but all them are NONE. So is there anyway to get these gradients.
I need the gradients somehow any help would be greatly appreciated.
for name, param in model.named_parameters():
print(name,param.grad)
I even used the args.num_process=1 but the output is still the same
conv1.weight None
conv1.bias None
conv2.weight None
conv2.bias None
fc1.weight None
fc1.bias None
fc2.weight None
fc2.bias None
I even tried to use multiprocessing queue to return the gradients but the problem is that queue is not able to return that big size of the gradients.