AttributeError: module ‘torch.jit‘ has no attribute ‘_script_if_tracing‘

简介: AttributeError: module ‘torch.jit‘ has no attribute ‘_script_if_tracing‘

项目场景:


torvh使用提示


AttributeError: module 'torch.jit' has no attribute '_script_if_tracing'


原因分析:


解决办法:原因是torch与torchvision版本不匹配导致的,重新安装torchvision即可


解决方案:


pip install torchvision==0.5.0


目录
打赏
0
0
0
0
691
分享
相关文章
AttributeError: module ‘numpy‘ has no attribute ‘array‘解决办法
AttributeError: module ‘numpy‘ has no attribute ‘array‘解决办法
925 0
AttributeError: module ‘distutils‘ has no attribute ‘version‘解决跑pytorch代码报错
AttributeError: module ‘distutils‘ has no attribute ‘version‘解决跑pytorch代码报错
AttributeError: module ‘torch.utils‘ has no attribute ‘data‘
属性错误:模块的'torch.utils'没有属性'data'
139 0
解决AttributeError: module ‘tensorflow‘ has no attribute ‘div‘
解决AttributeError: module ‘tensorflow‘ has no attribute ‘div‘
205 0
解决AttributeError: module ‘tensorflow‘ has no attribute ‘div‘
TensorRT:AttributeError: 'module' object has no attribute 'Logger'
TensorRT:AttributeError: 'module' object has no attribute 'Logger'
263 0
问题解决:AttributeError: 'module' object has no attribute '_rebuild_tensor_v2'
问题解决:AttributeError: 'module' object has no attribute '_rebuild_tensor_v2'
309 0
AttributeError: module 'cv2' has no attribute 'xfeatures2d'问题解决
AttributeError: module 'cv2' has no attribute 'xfeatures2d'问题解决
3308 0

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等