ChiWeiHsiao / DeepVO-pytorch

PyTorch Implementation of DeepVO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem about running main.py

BrianWayland opened this issue · comments

@ChiWeiHsiao Hi, when I try to run main.py, it always alert the error below:

Traceback (most recent call last):
File "main.py", line 114, in
ls = M_deepvo.step(t_x, t_y, optimizer).data.cpu().numpy()
File "/root/DeepVO3/model.py", line 133, in step
optimizer.step()
File "/root/anaconda3/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 15, in decorate_context
return func(*args, **kwargs)
File "/root/anaconda3/lib/python3.8/site-packages/torch/optim/adagrad.py", line 99, in step
std = state['sum'].sqrt().add_(group['eps'])
KeyError: 'eps'

I want to know how to solve this exception.
Thank you for your time.

Actually this problem may cause by the wrong version of pytorch. The model provided by author is trained under pytorch 0.4.0, but now the pytorch version is 1.6.0. Anyway, modifying the parameters resume to false and specify the value of pretrained_flownet can solve this problem.