Traceback (most recent call last):
| 0/130.0 [00:00<?, ?it/s]


 "main.py", line 429, in <module>

train_loss, iterations = train(args=args, epoch=epoch, start_iteration=global_iteration, data_loader=train_loader, model=model_and_loss, optimizer=optimizer, logger=train_logger, offset=offset)


 "main.py", line 295, in train

loss_val.backward()


 "/home/hazhang/.conda/envs/virt_optflow/lib/python3.6/site-packages/torch/tensor.py", line 102, in backward

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


 "/home/hazhang/.conda/envs/virt_optflow/lib/python3.6/site-packages/torch/autograd/__init__.py", line 91, in backward

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

Traceback (most recent call last):


 "<stdin>", line 1, in <module>


 "/usr/local/lib/python3.7/site-packages/torchsummary/torchsummary.py", line 68, in summary

model.apply(register_hook)


 "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 287, in apply

module.apply(fn)


 "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 287, in apply

module.apply(fn)


 "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 287, in apply

module.apply(fn)


 "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 288, in apply

fn(self)


 "/usr/local/lib/python3.7/site-packages/torchsummary/torchsummary.py", line 42, in register_hook

hooks.append(module.register_forward_hook(hook))


 "/usr/local/lib/python3.7/site-packages/torch/jit/__init__.py", line 1689, in fail

raise RuntimeError(name + " is not supported on ScriptModules")
RuntimeError: register_forward_hook is not supported on ScriptModules
