my env is CUDA 10.1, and pytorch 1.3,GPU v100,python 3.6,
and I get error:
Warning: multi_tensor_applier fused unscale kernel is unavailable, possibly because apex was installed without --cuda_ext --cpp_ext. Using Python fallback. Original ImportError was: ModuleNotFoundError("No module named 'amp_C'",)
Traceback (most recent call last):
File "train.py", line 104, in
lr_scheduler = config_lr_scheduler(args, optimizer)
File "/home/perception/Documents/apex-master/geely_yolo3D/utils/utils.py", line 553, in config_lr_scheduler
return torch.optim.lr_scheduler.StepLR(optimizer, args.lr_decay_epoch, args.gamma)
File "/home/perception/anaconda3/envs/new/lib/python3.6/site-packages/torch/optim/lr_scheduler.py", line 208, in __init__
super(StepLR, self).__init__(optimizer, last_epoch)
File "/home/perception/anaconda3/envs/new/lib/python3.6/site-packages/torch/optim/lr_scheduler.py", line 58, in __init__
self.optimizer.step = with_counter(self.optimizer.step)
File "/home/perception/anaconda3/envs/new/lib/python3.6/site-packages/torch/optim/lr_scheduler.py", line 40, in with_counter
instance_ref = weakref.ref(method.__self__)
AttributeError: 'function' object has no attribute '__self__'
My code run well in env : CUDA 9,pytorch 1.2,GPU P4000,python 3.6
Please help me with this issue.
Should by fixed by https://github.com/NVIDIA/apex/pull/553. Try puling the latest master and reinstalling:
apex $ git pull
apex $ pip uninstall apex # repeat until you're sure it's gone
apex $ pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
Thanks for your reply !
I download code zip yesterday ,which should be the latest version.
and I have fixed the problem by pip install using pip in conda--bin install of pip default .
Most helpful comment
Should by fixed by https://github.com/NVIDIA/apex/pull/553. Try puling the latest master and reinstalling: