Skip to main content
deleted 4 characters in body
Source Link
gogasca
  • 9.8k
  • 8
  • 83
  • 131

Keras file is located into a new path in Google Cloud Storage (Before it was in AWS S3):

https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz

When using:

tf.keras.datasets.mnist.load_data()

You can pass a path parameter.

load_data() will call get_file() which takes as parameter fname, if path is a full path and file exists, it will not be downloaded.

Example:

# gsutil cp gs://tensorflow/tf-keras-datasets/mnist.npz /tmp/data/mnist.npz
# python3
>>> import tensorflow as tf
>>> path = ```'/tmp/data/mnist.npz```npz'
>>> (train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.mnist.load_data(path)
>>> len(train_images)
>>> 60000

Keras file is located into a new path in Google Cloud Storage (Before it was in AWS S3):

https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz

When using:

tf.keras.datasets.mnist.load_data()

You can pass a path parameter.

load_data() will call get_file() which takes as parameter fname, if path is a full path and file exists, it will not be downloaded.

Example:

# gsutil cp gs://tensorflow/tf-keras-datasets/mnist.npz /tmp/data/mnist.npz
# python3
>>> import tensorflow as tf
>>> path = ```/tmp/data/mnist.npz```
>>> (train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.mnist.load_data(path)
>>> len(train_images)
>>> 60000

Keras file is located into a new path in Google Cloud Storage (Before it was in AWS S3):

https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz

When using:

tf.keras.datasets.mnist.load_data()

You can pass a path parameter.

load_data() will call get_file() which takes as parameter fname, if path is a full path and file exists, it will not be downloaded.

Example:

# gsutil cp gs://tensorflow/tf-keras-datasets/mnist.npz /tmp/data/mnist.npz
# python3
>>> import tensorflow as tf
>>> path = '/tmp/data/mnist.npz'
>>> (train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.mnist.load_data(path)
>>> len(train_images)
>>> 60000
Source Link
gogasca
  • 9.8k
  • 8
  • 83
  • 131

Keras file is located into a new path in Google Cloud Storage (Before it was in AWS S3):

https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz

When using:

tf.keras.datasets.mnist.load_data()

You can pass a path parameter.

load_data() will call get_file() which takes as parameter fname, if path is a full path and file exists, it will not be downloaded.

Example:

# gsutil cp gs://tensorflow/tf-keras-datasets/mnist.npz /tmp/data/mnist.npz
# python3
>>> import tensorflow as tf
>>> path = ```/tmp/data/mnist.npz```
>>> (train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.mnist.load_data(path)
>>> len(train_images)
>>> 60000