WARNING:tensorflow:From d:\vscode project\lstm\new.py:6: read_data_sets (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
解决办法:
自己新建一个文件夹,存放自己下载的数据
import numpy as np
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('./mnist_data/', one_hot=True)
print(mnist.train.images.shape)
mnist数据集可以在这里下载: