Thank you for your reply sir. I have a few more questions. I have 2 classes in my dataset. Their labels are currently [0, 1] and [1, 0].

Do you mean the label of each class would be an integer e.g. 0 or 1 ?
And does that mean that the last layer of my neural network have only 1 neuron ?
So does that mean that I should not apply a softmax function prior at the output ?

EDIT: I made sure my labels are now categorical i.e. 0,1. I only have 1 neuron at the output layer. I receive this error. Assertion `cur_target >= 0 && cur_target < n_classes’ failed.  at c:\miniconda2\conda-bld\pytorch-cpu_1519448892730\work\torch\lib\thnn\generic/ClassNLLCriterion.c:87