load_cifar10

tfsnippet.datasets.load_cifar10(channels_last=True, x_shape=None, x_dtype=<type 'numpy.float32'>, y_dtype=<type 'numpy.int32'>, normalize_x=False)

Load the CIFAR-10 dataset as NumPy arrays.

Parameters:
  • channels_last (bool) – Whether or not to place the channels axis at the last?
  • x_shape – Reshape each digit into this shape. Default to (32, 32, 3) if channels_last is True, otherwise default to (3, 32, 32).
  • x_dtype – Cast each digit into this data type. Default np.float32.
  • y_dtype – Cast each label into this data type. Default np.int32.
  • normalize_x (bool) – Whether or not to normalize x into [0, 1], by dividing each pixel value with 255.? (default False)
Returns:

The

(train_x, train_y), (test_x, test_y)

Return type:

(np.ndarray, np.ndarray), (np.ndarray, np.ndarray)