prismformore/Multi-Task-Transformer

RuntimeError: value cannot be converted to type float without overflow

Opened this issue · 0 comments

Traceback (most recent call last):
File "main.py", line 176, in
main()
File "main.py", line 152, in main
end_signal, iter_count = train_phase(p, args, train_dataloader, test_dataloader, model, criterion, optimizer, scheduler, epoch, tb_writer_train, tb_writer_test, iter_count)
File "Multi-Task-Transformer-main/InvPT/utils/train_utils.py", line 41, in train_phase
optimizer.step()
File "/home/anaconda3/envs/vmb/lib/python3.8/site-packages/torch/optim/lr_scheduler.py", line 68, in wrapper
return wrapped(*args, **kwargs)
File "/home/anaconda3/envs/vmb/lib/python3.8/site-packages/torch/optim/optimizer.py", line 140, in wrapper
out = func(*args, **kwargs)
File "/home/anaconda3/envs/vmb/lib/python3.8/site-packages/torch/optim/optimizer.py", line 23, in _use_grad
ret = func(self, *args, **kwargs)
File "/home/anaconda3/envs/vmb/lib/python3.8/site-packages/torch/optim/adam.py", line 234, in step
adam(params_with_grad,
File "/home/anaconda3/envs/vmb/lib/python3.8/site-packages/torch/optim/adam.py", line 300, in adam
func(params,
File "/home/anaconda3/envs/vmb/lib/python3.8/site-packages/torch/optim/adam.py", line 412, in single_tensor_adam
param.addcdiv(exp_avg, denom, value=-step_size)
RuntimeError: value cannot be converted to type float without overflow