RuntimeError: size mismatch, m1: [8 x 73728], m2: [512 x 227] at C:/w/1/s/windows/pytorch/aten/src\THC/generic/THCTensorMathBlas.cu:290

The code works fine for me:

model =  SENet(PreActBlock, [2,2,2,2])

num_ftrs = model.linear.in_features # revising the categories classes
model.linear= nn.Linear(num_ftrs, 10)

out = model(torch.randn(1, 3, 32, 32))
print(out.shape)
> torch.Size([1, 10])

PS: It’s always better to post code by wrapping it into three backticks ```, as it’s easier to debug and also the pictures are really hard to read. :wink: