Scidata.FashionMNIST.download

You're seeing just the function download, go back to Scidata.FashionMNIST module for more information.

Downloads the FashionMNIST training dataset or fetches it locally.

Returns a tuple of format:

{{images_binary, images_type, images_shape},
 {labels_binary, labels_type, labels_shape}}

If you want to one-hot encode the labels, you can:

labels_binary
|> Nx.from_binary(labels_type)
|> Nx.new_axis(-1)
|> Nx.equal(Nx.tensor(Enum.to_list(0..9)))

Examples

iex> Scidata.FashionMNIST.download()
{{<<105, 109, 97, 103, 101, 115, 45, 105, 100, 120, 51, 45, 117, 98, 121, 116,
    101, 0, 236, 253, 7, 88, 84, 201, 215, 232, 11, 23, 152, 38, 57, 51, 166,
    81, 71, 157, 209, 49, 135, 49, 141, 99, 206, 142, 57, 141, 89, 68, ...>>,
  {:u, 8}, {3739854681, 226418, 1634299437}},
 {<<0, 3, 116, 114, 97, 105, 110, 45, 108, 97, 98, 101, 108, 115, 45, 105, 100,
    120, 49, 45, 117, 98, 121, 116, 101, 0, 53, 221, 9, 130, 36, 73, 110, 100,
    81, 219, 220, 150, 91, 214, 249, 251, 20, 141, 247, 53, 114, ...>>, {:u, 8},
  {3739854681}}}