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


目录
相关文章
|
数据处理 Python
AttributeError: module ‘numpy‘ has no attribute ‘array‘解决办法
AttributeError: module ‘numpy‘ has no attribute ‘array‘解决办法
714 0
|
TensorFlow 算法框架/工具 Python
成功解决AttributeError: module 'numpy' has no attribute 'equal'
成功解决AttributeError: module 'numpy' has no attribute 'equal'
成功解决AttributeError: module 'numpy' has no attribute 'equal'
|
PyTorch 算法框架/工具 Python
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'
87 0
|
TensorFlow API 算法框架/工具
解决AttributeError: module ‘tensorflow‘ has no attribute ‘div‘
解决AttributeError: module ‘tensorflow‘ has no attribute ‘div‘
164 0
解决AttributeError: module ‘tensorflow‘ has no attribute ‘div‘
TensorRT:AttributeError: 'module' object has no attribute 'Logger'
TensorRT:AttributeError: 'module' object has no attribute 'Logger'
218 0
|
PyTorch 算法框架/工具
问题解决:AttributeError: 'module' object has no attribute '_rebuild_tensor_v2'
问题解决:AttributeError: 'module' object has no attribute '_rebuild_tensor_v2'
265 0
|
TensorFlow 算法框架/工具
TF版本升级问题:成功解决AttributeError: module tensorflow has no attribute mul
TF版本升级问题:成功解决AttributeError: module tensorflow has no attribute mul
TF版本升级问题:成功解决AttributeError: module tensorflow has no attribute mul
|
TensorFlow 算法框架/工具
成功解决AttributeError: module ‘tensorflow‘ has no attribute ‘get_variable‘
成功解决AttributeError: module ‘tensorflow‘ has no attribute ‘get_variable‘