Traceback (most recent call last):


 "exec.py", line 167, in <module>

train(logger)


 "exec.py", line 46, in train

starting_epoch = utils.load_checkpoint(cf.resume_to_checkpoint, net, optimizer)


 "/home/ivan/retcustom3d/utils/exp_utils.py", line 186, in load_checkpoint

net.load_state_dict(checkpoint['state_dict'])


 "/home/ivan/.virtualenvs/virtual-py3/lib/python3.5/site-packages/torch/nn/modules/module.py", line 719, in load_state_dict

self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for net:

Traceback (most recent call last):


 "C:\tools\miniconda3\envs\scanner-pyro\lib\site-packages\IPython\core\interactiveshell.py", line 3265, in run_code

exec(code_obj, self.user_global_ns, self.user_ns)


 "<ipython-input-6-68d49e4377f9>", line 26, in <module>

train()


 "<ipython-input-6-68d49e4377f9>", line 23, in train

svi.step(xs, prior_loc, prior_scale)


 "C:\tools\miniconda3\envs\scanner-pyro\lib\site-packages\pyro\infer\svi.py", line 99, in step

loss = self.loss_and_grads(self.model, self.guide, *args, **kwargs)


 "C:\tools\miniconda3\envs\scanner-pyro\lib\site-packages\pyro\infer\trace_elbo.py", line 136, in loss_and_grads

surrogate_loss_particle.backward(retain_graph=self.retain_graph)


 "C:\tools\miniconda3\envs\scanner-pyro\lib\site-packages\torch\tensor.py", line 107, in backward

torch.autograd.backward(self, gradient, retain_graph, create_graph)


 "C:\tools\miniconda3\envs\scanner-pyro\lib\site-packages\torch\autograd\__init__.py", line 93, in backward

allow_unreachable=True)
# allow_unreachable flag
RuntimeError: Function AddBackward0 returned an invalid gradient at index 1 - expected type torch.cuda.FloatTensor but got torch.FloatTensor
