NVIDIA/apex

How can I solve it?

Roll77-luo opened this issue · 5 comments

When using apex mixed precision training, a convolution module in my code needs to be used twice, which leads to an error:Index
1
error: tuple index out of range. How should I solve it?

I met same IndexError when do prediction. If I removed apex mixed precesion training, prediction is fine.

Same problem while training model under mixed-precision mode.

When using apex mixed precision training, a convolution module in my code needs to be used twice, which leads to an error:Index 1 error: tuple index out of range. How should I solve it?

Fixed by downgrading pytorch's version from 1.10 to 1.8.1

I met the same question when my torch version was 1.10.0
There is my solution

reinstall the whole environment
install torch=1.9.0
install apex

(I didn't use version 1.8. X because an inherent error may be reported in subsequent tasks

Please use the native mixed-precision training util. via torch.cuda.amp as described here which is supported in the current PyTorch release. Closing