WARNING: Logging before flag parsing goes to stderr.
W0815 13:04:20.904257 5308 deprecation.py:323] From <ipython-input-2-51754e844915>:1: 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.
W0815 13:04:20.904257 5308 deprecation.py:323] From C:\ProgramData\Anaconda3\envs\tensorflow1.14\lib\site-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.
W0815 13:04:20.904257 5308 deprecation.py:323] From C:\ProgramData\Anaconda3\envs\tensorflow1.14\lib\site-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 MNIST_data\train-images-idx3-ubyte.gz
W0815 13:04:21.148457 5308 deprecation.py:323] From C:\ProgramData\Anaconda3\envs\tensorflow1.14\lib\site-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.
W0815 13:04:21.148457 5308 deprecation.py:323] From C:\ProgramData\Anaconda3\envs\tensorflow1.14\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py:110: dense_to_one_hot (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use tf.one_hot on tensors.
W0815 13:04:21.210657 5308 deprecation.py:323] From C:\ProgramData\Anaconda3\envs\tensorflow1.14\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py:290: DataSet.__init__ (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.
Extracting MNIST_data\train-labels-idx1-ubyte.gz
Extracting MNIST_data\t10k-images-idx3-ubyte.gz
Extracting MNIST_data\t10k-labels-idx1-ubyte.gz
W0815 13:04:21.548257 5308 deprecation.py:506] From C:\ProgramData\Anaconda3\envs\tensorflow1.14\lib\site-packages\tensorflow\python\training\adagrad.py:76: calling Constant.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
#开始训练#初始化全局参数
tf.global_variables_initializer().run()for i inrange(3000):
batch_xs,batch_ys = mnist.train.next_batch(100)
train_step.run({x:batch_xs,y_:batch_ys,keep_prop:0.75})print("训练结束")