I got the code working finally, thank you!
The only problem is, the loss seems to be still terrible.
I am trying different learning rates =  0.01, 0.05, 0.001, optimizer SGD, Adam or Adagrad, CrossEntropy or NLL loss. Epochs = 5 or 10.
I am not sure if my NN works properly, the loss seems to get very strange values. What could be a realistic loss for such a multi-class classification problem? I am never lower than 0.5 for different sizes of batches (I tried 10, 50, 100, 1000), average is around 0.9:
…




Train Epoch: 4 [44500/45324 (98%)]
Loss: 1.194766




Train Epoch: 4 [44600/45324 (98%)]
Loss: 0.656055


Train Epoch: 4 [44700/45324 (99%)]
Loss: 0.755115


Train Epoch: 4 [44800/45324 (99%)]
Loss: 0.929295


Train Epoch: 4 [44900/45324 (99%)]
Loss: 0.823785


Train Epoch: 4 [45000/45324 (99%)]
Loss: 1.219415


Train Epoch: 4 [45100/45324 (99%)]
Loss: 0.845087


Train Epoch: 4 [45200/45324 (100%)]
Loss: 0.934597


Train Epoch: 4 [45300/45324 (100%)]
Loss: 0.878224



///
When I submitted the results for our project, I got a very low baseline ( I do not have ground truth labels unfortunately, to evaluate the model on test set.
My evaluation loop is as follows in this case:
///
model.eval()
y = []
pred = []
for i, (x_test) in enumerate(test_loader):
x_test = Variable(x_test)
output = model(x_test)
output = torch.max(output.data,1)[1]
y = output.numpy()[0]
pred.append(y)
///
Would you mind having a look and shed some light to that problem?
Thanks again!