ptrblck:

model = nn.Sequential( nn.Dropout(0.5), nn.Linear(10, 10) ) x = torch.randn(1, 10) out = model(x) print(out) # Case 2 model = nn.Sequential( nn.Linear(10, 10), nn.Dropout(0.5) ) x = torch.randn(1, 10) out = model(x)


Thank you so much for this example.
Could you tell me what we are dropping in Resnet before the last layer because there is no linear layer before the last layer but a convolutional layer?
Regards