Thanks a tonne!!  that actually worked. My model got trained, atleast it printed Finished training!, didn’t knew that for multiclass classification problem one has to approach with CrossEntropyLoss.
Before leaving i have few more questions! I hope im not asking too much.
since im writing my custom net, now i need to test my net with the validation set, which looks like,
test_samples = TensorDataset(X_test, y_test)
valid_loader = DataLoader(test_samples, batch_size=64, shuffle=True)

but i tried straight away with
# pass it through the model
prediction = model(X_test)

# get the result out and reshape it
cpu_pred = prediction.cpu()
result = cpu_pred.data.numpy()
print(result)

as shown here.
Im getting this following error,
RuntimeError: save_for_backward can only save input or output tensors, but argument 0 doesn't satisfy this condition

how should I proceed for making a prediction for my X_test, if there are any other links, that would help me. Again thanks in advance.