Reputation: 2240
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.
Upvotes: 6
Views: 12037
Reputation: 477
Those who are looking for tensorflow2 and numpy compatible versions. They work fine together.
Tensorflow 2.4.1
numpy 1.19.5
Upvotes: 2
Reputation:
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
Upvotes: 5