Up データのロード 作成: 2021-04-17
更新: 2021-04-17


      >>> from tensorflow import keras >>> fashion_mnist = keras.datasets.fashion_mnist >>> (train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data() Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/train-labels-idx1-ubyte.gz 32768/29515 [=================================] - 0s 2us/step Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/train-images-idx3-ubyte.gz 26427392/26421880 [==============================] - 31s 1us/step Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-labels-idx1-ubyte.gz 8192/5148 [===============================================] - 0s 0us/step Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-images-idx3-ubyte.gz 4423680/4422102 [==============================] - 6s 1us/step >>>

    このとき,カーレントディレクトリに,ディレクトリ .keras が以下の内容でつくられる:

      .keras ┬ datasets ─ fashion-mnist │ ├ t10k-images-idx3-ubyte.gz │ ├ t10k-labels-idx1-ubyte.gz │ ├ train-images-idx3-ubyte.gz │ └ train-labels-idx1-ubyte.gz └ keras.json



    "Downloading data ‥‥" となるのは初回だけ。
    次回からは,ダウンロードしたデータから読み込まれ,つぎのようになる:
      >>> (train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data() >>>