PlaneMatch
PlaneMatch copied to clipboard
AttributeError: 'BatchNorm2d' object has no attribute 'num_batches_tracked'
I'm using pytorch0.3.1 with python3.6, cudnn-7.1.3 and cudatoolkit-8.0 and had some problems. I have googled and know that it is because the pytorch version I used is different from that is used to train the model.
The log is below:
Start testing ......
Traceback (most recent call last):
File "/mnt/E/zhenglongyu/pycharm-community-2018.1.4/helpers/pydev/pydev_run_in_console.py", line 52, in run_file
pydev_imports.execfile(file, globals, locals) # execute the script
File "/mnt/E/zhenglongyu/pycharm-community-2018.1.4/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/mnt/E/zhenglongyu/PlaneMatch/test.py", line 77, in
So could you tell me the pytorch version you used to train the model
Did you solve the problem? I would recommend you to first switch to python 2.7 and see if that works.
I got the same error but not in training the model.. just testing it.
I realized I forgot to add:
model.eval()