SCALNet icon indicating copy to clipboard operation
SCALNet copied to clipboard

ImportError: cannot import name 'Conv2d' from 'network'

Open Akbarkhan87 opened this issue 3 years ago • 2 comments

When I want to run this piece of code it throws an error

python train.py --model DLANet --dataset NWPU --batch_size 32 --loss LocLoss --gpus 0 --lr 0.0001 --epochs 20 --save_model_interval 2 --preload --save

ImportError: cannot import name 'Conv2d' from 'network'

Akbarkhan87 avatar Jul 19 '21 07:07 Akbarkhan87

As discussed on https://stackoverflow.com/a/68451495/51685, this is likely due to running the program on Python 3 and having a network module installed in site-packages.

akx avatar Jul 20 '21 08:07 akx

@Akbarkhan87 Yes, as @akx mentioned. I built the project with Python 2.7. Thanks for your answer.

WangyiNTU avatar Jul 23 '21 00:07 WangyiNTU