Hi Hyuntae!



 hyuntae:

can you tell me how I can check the gradient?


Look at the grad property of the tensor.  So in your case:
self.classifier.fc[0].weight[0:1].grad

If the gradient hasn’t been created yet (for example, if .backward()
hasn’t been called) .grad will be None.  Otherwise, .grad will be
a tensor, possibly zero.
Best.
K. Frank