import input_data MNIST tensorflow not working

前端 未结 15 1555
感情败类
感情败类 2020-12-09 14:44

TensorFlow MNIST example not running with fully_connected_feed.py

I checked this out and realized that input_data was not built-in. So I downloaded the

15条回答
  •  暖寄归人
    2020-12-09 15:22

    There's now a much easier way to load MNIST data into tensorflow without having to download the data by using Tensorflow 2 and Tensorflow Datasets

    To get started, make sure you import Tensorflow and specify the 2nd version:

    %tensorflow_version 2.x
    import tensorflow as tf
    

    Then load the data into a dictionary using the following code:

    MNIST_data = tfds.load(name = "mnist")
    

    and Then split the data into train and test:

    train, test = MNIST_data['train'] , MNIST_data['test']
    

    Now you can use these data generators however you like.

提交回复
热议问题