报错:
AttributeError: module 'numpy' has no attribute 'object'. np.object
was a deprecated alias for the builtin object
. To avoid this error in existing code, use object
by itself. Doing this will not modify any behavior and is safe.
位置:
opt/conda/envs/debug_env/lib/python3.8/site-packages/onnx/mapping.py:27: FutureWarning: In the future np.object
will be defined as the corresponding NumPy scalar. int(TensorProto.STRING): np.dtype(np.object)
解决:
打开文件:opt/conda/envs/debug_env/lib/python3.8/site-packages/onnx/mapping.py
并将下图代码中的np.object修改为python自带的object即可解决。