Open jessika0991 opened 7 years ago
Can you please specify the type of network you are using??
I am using the pretrained model Resnet-34. However I solved this problem using model:cuda() after making the modifications in the network. Even though this problem is solved I got another problem that I haven't solved yet: When I remove the last basic block layer that has Features = 512 and I connect the fully connected layer to the basic block layer with Features = 256, instead of having an output tensor with dimensions batchSize x nClasses that in my case is 32x2 (as it happens in the original model), I get a different one with dimension 2048x2.
Can I modify the pretrained network? I have tried to remove some layers modifying the nFeatures value, which is used to nn.View and nn.Linear, according to the size of the layer above nn.View. However, I got the following error:
Any idea how I could solve this?
Thanks in advance