错误出现: 在使用torch导出onnx后,使用
onnx.load("xxx.onnx")
出现 AttributeError: module ‘onnx’ has no attribute ‘load’
错误原因: 详见https://github.com/pytorch/pytorch/issues/28835 大概是说onnx在torch里自带了个功能不那么全(只有export),自己装一个就行咯
解决方法:
pip install onnx