【发布时间】:2018-12-21 01:27:49
【问题描述】:
这是我的代码
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot = True)
这些是我在运行它时收到的警告,我使用的是在线环境,Google Colab 来运行它
WARNING:tensorflow:From <ipython-input-2-0d6f173b16c0>:6: read_data_sets
(from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and
will be removed in a future version.
Instructions for updating:
Please use alternatives such as official/mnist/dataset.py from
tensorflow/models.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-
packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:260:
maybe_download (from tensorflow.contrib.learn.python.learn.datasets.base) is
deprecated and will be removed in a future version.
Instructions for updating:
Please write your own downloading logic.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-
packages/tensorflow/contrib/learn/python/learn/datasets/base.py:252:
_internal_retry.<locals>.wrap.<locals>.wrapped_fn (from
tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will
be removed in a future version.
Instructions for updating:
Please use urllib or similar directly.
Successfully downloaded train-images-idx3-ubyte.gz 9912422 bytes.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-
packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:262:
extract_images (from tensorflow.contrib.learn.python.learn.datasets.mnist) is
deprecated and will be removed in a future version.
Instructions for updating:
Please use tf.data to implement this functionality.
Extracting /tmp/data/train-images-idx3-ubyte.gz
Successfully downloaded train-labels-idx1-ubyte.gz 28881 bytes.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-
packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:267:
extract_labels (from tensorflow.contrib.learn.python.learn.datasets.mnist) is
deprecated and will be removed in a future version.
Instructions for updating:
Please use tf.data to implement this functionality.
Extracting /tmp/data/train-labels-idx1-ubyte.gz
任何帮助将不胜感激
【问题讨论】:
-
到底是什么问题?它确实包含更新代码的说明
-
字面意思是“请使用 tf.data 来实现这个功能。”
标签: python tensorflow deep-learning google-colaboratory