You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using tf2onnx with TensorFlow 2.18 and NumPy 2.0.2, an AttributeError occurs due to the removal of np.cast in NumPy 2.0. The error message is as follows:
File "site-packages/tf2onnx/tfonnx.py", line 77, in rewrite_constant_fold "Cast": np.cast, AttributeError: np.cast was removed in the NumPy 2.0 release. Use np.asarray(arr, dtype=dtype) instead.
System information
OS Platform and Distribution: Ubuntu 22.04.5 LTS
TensorFlow Version: 2.18
tf2onnx Version: 2.16.1
Python version: 3.10.12
To Reproduce
Install TensorFlow 2.18 and tf2onnx 1.16.1.
Ensure NumPy above 2.0 is installed.
Run a script that uses tf2onnx.
The text was updated successfully, but these errors were encountered:
Hello, i did a dirty fix to resolve the issue(when I tested it I had no problems afterwards), just check my pull (sorry, i closed it when I deleted my forked repo, but you can still see the modifications)
Describe the bug
When using
tf2onnx
with TensorFlow 2.18 and NumPy 2.0.2, anAttributeError
occurs due to the removal ofnp.cast
in NumPy 2.0. The error message is as follows:File "site-packages/tf2onnx/tfonnx.py", line 77, in rewrite_constant_fold "Cast": np.cast, AttributeError: np.cast was removed in the NumPy 2.0 release. Use np.asarray(arr, dtype=dtype) instead.
System information
To Reproduce
tf2onnx
.The text was updated successfully, but these errors were encountered: