stat453-deep-learning-ss21 icon indicating copy to clipboard operation
stat453-deep-learning-ss21 copied to clipboard

Pre-train notebook sets requires_grad = True for ReLU rather than the Linear layer.

Open AliceSum opened this issue 4 years ago • 0 comments

image

It should be Model.classifier[0].requires_grad = True because the layer at index 0 is the linear layer. Index 1 is the ReLU layer which does not have trainable parameters.

I have retrained the small VGG notebook with Model.classifier[0].requires_grad = True. The end result is kind of the same. That is test accuracy is 78%, but the training accuracy is slightly higher than the original notebook. image

AliceSum avatar Jun 25 '21 12:06 AliceSum