Environmental problems are the most common problems that everyone encounters. Run pip list with cmd to check whether the environment is correct
. I suggest you use
python here: python3.7
torch1.6.0+gpu (if there is no gpu, directly torch1.6.0)
torchvision0.7.0+gpu (same as above)
cuda10.2
The most problematic is numpy. Don’t install this separately. It is related to torch. If the version does not correspond to it, an error may be reported. I’m using numpy here.1.19.5
** Once an error is found, first look at the environment! ! ! **It is useless to change the code if the environment is wrong
This is my environment