https://github.com/pytorch/tutorials/blob/48e5cccecbd385e00b95cb60ecdfecd06a43282b/intermediate_source/char_rnn_generation_tutorial.py#L281 Hello folks at Pytorch, When instantiating loss at a real zero, i think you rather meant something like (i don't know if there is a better way but I usually do it this way) : `loss = torch.autograd.Variable(torch.Tensor([0]))`