Hi ptrblck, well it is working   thank you for your suggestions and reply,
like usual solving one issue and start working on another error  
I am getting one target out of bounds after running the script,
line 2218, in nll_loss
ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
IndexError: Target 16 is out of bounds.
still I didnt debug it yet properly but I thought to update you that the size mismatch issue sorted out Thank you heaps.