Hello pvardanis!



 pvardanis:

Wherever I try to print list(self.network.parameters())[0].grad is None) I always get True.


From your other threads I have the impression that you are using
a pre-trained VGG-16 network with a little of your own network
architecture on the back end.  (Is this correct?)
Is it possible that you are freezing the VGG-16 weights (not
unreasonable) and only updating (“fine-tuning”) the weights of
your back-end architecture?  If so, it is possible that
list(network.parameters())[0] is a frozen VGG-16
weight, so that it doesn’t have a grad, and  isn’t changed by
your optimization step?
Best.
K. Frank