The modules you’re adding have some Parameters, so they need to be submodules of CaffeNet
. It should work if you use a torch.nn.Sequential
instead of a regular Python list for self.layers
.
3 Likes
The modules you’re adding have some Parameters, so they need to be submodules of CaffeNet
. It should work if you use a torch.nn.Sequential
instead of a regular Python list for self.layers
.