I'm getting warnings combining 1.14.0 with numpy 1.17.2. Do these go together? I can't find any official TF page stating compatibility requirements.
But, tensorflow requires numpy version==1.2.
TensorFlow implements a subset of the NumPy API, available as tf. experimental. numpy . This allows running NumPy code, accelerated by TensorFlow, while also allowing access to all of TensorFlow's APIs.
Make sure you are using the Anaconda prompt, as the conda command only works in an Anaconda environment, and type conda list numpy . The result will show the version of numpy and associated packages.
Please downgrade numpy
version from 1.17.2
to 1.16.4
will resolve issue with Tensorflow 1.14.0
Here am able to replicate issue
import tensorflow as tf
print(tf.__version__)
import numpy as np
print(np.__version__)
Output:
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
1.14.0
1.17.2
To fix this, please execute below code to downgrade numpy
to 1.16.4
pip uninstall numpy
pip install numpy==1.16.4
After that, please restart your runtime and execute below code
import tensorflow as tf
print(tf.__version__)
import numpy as np
print(np.__version__)
Output:
1.14.0
1.16.4
Those who are looking for tensorflow2 and numpy compatible versions. They work fine together.
Tensorflow 2.4.1
numpy 1.19.5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With