CasellaJr:

512


You mean here?
self.classifier = nn.Sequential(             nn.Linear(2048, 4096),
change this into:
self.classifier = nn.Sequential(             nn.Linear(512, 4096),
If I do in this way, then:
model = Net()
output = model(test_x)
output.shape

I have the same error:
RuntimeError: mat1 and mat2 shapes cannot be multiplied (1x2048 and 512x4096)
So, I think it is not the solution and that the first layer must remain with 2048 in_features self.classifier = nn.Sequential(             nn.Linear(2048, 4096),
I think the problem is in Intel OpenFL that I do not know how makes the training. Indeed the original error is during the training, not during the instance of the model.