Cannot import name ‘container_abcs‘ from ‘torch._six‘

Cannot import name ‘container_abcs’ from ‘torch._six’

记录一个bug解决

import collections.abc as container_abcs 替换 from torch._six import container_abcs

Reference:
[1] https://github.com/NVIDIA/apex/issues/1048

PS:实测APEX可以在CUDA10.2 + pytorch1.9.0的环境下使用

你可能感兴趣的:(小操作,pytorch,pytorch,深度学习)