Traceback (most recent call last):
File "train.py", line 266, in
var=opt.var,
File "train.py", line 160, in train
optimizer.step()
File "F:\Anaconda\anaconda3-5.2.0\lib\site-packages\torch\optim\adam.py", line 82, in step
exp_avg, exp_avg_sq = state['exp_avg'], state['exp_avg_sq']
KeyError: 'exp_avg'
when I used Adam or RMsprop instead of SGD锛宨t raised a key error锛宨 was confused about it. How can I solve it?
I know why!
I know why!
Hello, @Sierkinhane
I run into the same error.
Can you tell me how you fix it?
Hello, @Sierkinhane
I run into the same error.
Can you tell me how you fix it?
@ZQPei
Are you fix it ?
i meet the same error
Can you tell me how you solve it ?
Hello, thank you for your interest in our work! This issue seems to lack the minimum requirements for a proper response, or is insufficiently detailed for us to help you. Please note that most technical problems are due to:
git clone version of this repository we can not debug it. Before going further run this code and ensure your issue persists:sudo rm -rf yolov3 # remove existing
git clone https://github.com/ultralytics/yolov3 && cd yolov3 # clone latest
python3 detect.py # verify detection
python3 train.py # verify training (a few batches only)
# CODE TO REPRODUCE YOUR ISSUE HERE
train_batch0.jpg and test_batch0.jpg for a sanity check of training and testing data.If none of these apply to you, we suggest you close this issue and raise a new one using the Bug Report template, providing screenshots and minimum viable code to reproduce your issue. Thank you!
Hello. I meet the same error when I run on Google colab, train with my custom data.
But it dispeared after I refresh the colab page several times.
and I can run the same code on my windows10 pc without any bugs with Adam, even though win10 is different to the linux in colab.
Maybe it can be fixed by reinstall all the envs like the colab with python3.6 + pytorch1.5.0 + cuda10.1, etc. or just refresh colab if you run on colab. maybe py3.7 is better.
Or just reinstall torch since the error report from torch.optim.Adam.py
But why it hapened is still unkown.