Hy @Mi_Rak, the error is quite clear.



 Mi_Rak:

builtins.RuntimeError: size mismatch, m1: [512 x 505], m2: [512 x 505]


It’s just like how we do matrix multiplication (m * n) * (n * p) = m*p, where n has to be same for both matrix.
My guess,

Either your input shape is not according to the structure of your model.




 Mi_Rak:

      self.fc1=nn.Linear(116,500)
      self.hidden = nn.Linear(512,505)



Or this cause the problem since if you pass the input of fc1 to hidden then it should be something like this.
self.fc1 = nn.Linear(116,512) # nn.Linear(input_channel,output_channel)
self.hidden = nn.Linear(512,505) # nn.Linear(input_channel,output_channel)

Hope this solves the problem.