Hi, this is the Error I got:
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-3-06ac8d953a44> in <module>
     15         out=net(batch[0])
     16         loss = nn.MSELoss()(out, batch[1])
---> 17         loss.backward(retain_graph=False)
     18     print(i)
     19

~/anaconda3/envs/Juniper/lib/python3.7/site-packages/torch/tensor.py in backward(self, gradient, retain_graph, create_graph)
    183                 products. Defaults to ``False``.
    184         """
--> 185         torch.autograd.backward(self, gradient, retain_graph, create_graph)
    186
    187     def register_hook(self, hook):

~/anaconda3/envs/Juniper/lib/python3.7/site-packages/torch/autograd/__init__.py in backward(tensors, grad_tensors, retain_graph, create_graph, grad_variables)
    125     Variable._execution_engine.run_backward(
    126         tensors, grad_tensors, retain_graph, create_graph,
--> 127         allow_unreachable=True)  # allow_unreachable flag
    128
    129

RuntimeError: Function 'AddmmBackward' returned nan values in its 2th output.