5

I am running "./buildTF.sh" which uses TensorFlow, on ubuntu terminal. And getting the error as:

/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'.
  • https://stackoverflow.com/questions/57670240/about-tensorflow-import, https://stackoverflow.com/questions/57488150/tensorflow-warning-for-data-types – hpaulj Aug 29 '19 at 07:06
  • Does this answer your question? ["synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'." problem in TensorFlow](https://stackoverflow.com/questions/57381430/synonym-of-type-is-deprecated-in-a-future-version-of-numpy-it-will-be-underst) – Itamar Mushkin Jan 20 '20 at 09:13

3 Answers3

10

These warnings are classical FutureWarning, which means you can silent them using the warnings module from the python standard library:

import warnings
warnings.filterwarnings("ignore", message=r"Passing", category=FutureWarning)

This will check FutureWarning and silent the messages containing r"Passing".

tupui
  • 5,738
  • 3
  • 31
  • 52
8

This is a warning message which comes because of numpy version, uninstall the current numpy version and update it to 1.16.4.

# pip uninstall numpy 
# pip install numpy==1.16.4

Thanks to ymodak

PC_11
  • 267
  • 1
  • 6
0

If it is related to tensor flow, you can use following code: import logging logging.getLogger('tensorflow').disabled = True

NEERAJ SWARNKAR
  • 427
  • 4
  • 9