Closed hanxiaoTan closed 2 years ago
Thanks for the excellent work!
I have a question, is it necessary to convert fully-connected strata to convolutional layers?
My model was not build in pytorch sequence, so I removed the outer traversal of the model but then traversing the model causes problem:
newlayer.weight = nn.Parameter(module.weight.reshape(n, channel_out, h_w[0], h_w[1]))
RuntimeError: shape '[128, 64, 24, 24]' is invalid for input of size 1179648
seems like the target number of parameters are multiple times larger than it should be..
Solved, it was the problem of pooling layer
Thanks for the excellent work!
I have a question, is it necessary to convert fully-connected strata to convolutional layers?
My model was not build in pytorch sequence, so I removed the outer traversal of the model but then traversing the model causes problem:
newlayer.weight = nn.Parameter(module.weight.reshape(n, channel_out, h_w[0], h_w[1]))
RuntimeError: shape '[128, 64, 24, 24]' is invalid for input of size 1179648
seems like the target number of parameters are multiple times larger than it should be..