Thank you , I have fixed that error. But now I am getting following error ;

RuntimeError: Assertion `cur_target >= 0 && cur_target < n_classes’ failed.  at /Users/soumith/code/builder/wheel/pytorch-src/torch/lib/THNN/generic/ClassNLLCriterion.c:87