Тензор потока Jupyter Notebook дает "Будущее предупреждение" - PullRequest
0 голосов
/ 01 февраля 2020

Когда я запускаю программу Tensorflow в Jupyter Notebook , я получаю вывод, но также и следующее « FUTUREWARNNING ». Я создал среду Tensorflow в Anaconda, используя: conda create -n tf tensorflow

Я также инициализировал среду Tensorflow с помощью команды: conda activate

ПРОГРАММА:

import tensorflow as tf
print ("TensorFlow version: " + tf.__version__) 

ВЫХОД:

/home/atishrathour/.local/lib/python3.7/site-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)])
/home/atishrathour/.local/lib/python3.7/site-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)])
/home/atishrathour/.local/lib/python3.7/site-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)])
/home/atishrathour/.local/lib/python3.7/site-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)])
/home/atishrathour/.local/lib/python3.7/site-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)])
/home/atishrathour/.local/lib/python3.7/site-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)])

Версия TensorFlow: 1.14.0

/home/atishrathour/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub 
/dtypes.py:541: 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)])
/home/atishrathour/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub 
/dtypes.py:542: 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)])
/home/atishrathour/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub
/dtypes.py:543: 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)])
/home/atishrathour/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub
/dtypes.py:544: 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)])
/home/atishrathour/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub
/dtypes.py:545: 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)])
/home/atishrathour/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub
/dtypes.py:550: 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 Ответ

0 голосов
/ 01 февраля 2020

В чем вопрос? A FutureWarning не является ошибкой. Он предупреждает пользователей о том, что в будущем функция будет объявлена ​​устаревшей.

Предупреждения, которые вы видите, были отправлены на GitHub в тензор-поток / тензор-поток # 30427 . Они, вероятно, доброкачественные, но если вы хотите избавиться от них, потенциальное решение состоит в том, чтобы создать или создать новую среду conda и переустановить тензор потока с помощью conda или pip.

Так что либо:

conda create --name tf-env tensorflow

или

conda create --name tf-env python=3.6
conda activate tf-env
pip install --no-cache-dir tensorflow
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...