Hi,
In your network you are returning a nn.Module rather than a tensor. Probably, you want to return self.fc3(x).



 Bhavishya_Pandit:

def forward(self,inputs):
x=F.relu(self.fc1(inputs.squeeze(1).float()))
x=F.relu(self.fc2(x))
return self.fc3    # HERE


Also, please format code blocks to enhance readability. And generally, I think it would be very nice to learn the tools/rules available on this forum by first reading guidelines.
Bests