Scidata.MNIST.download
You're seeing just the function
download
, go back to Scidata.MNIST module for more information.
Downloads the MNIST training dataset or fetches it locally.
Options
:transform_images
- A function that transforms images, defaults to& &1
.It accepts a tuple like
{binary_data, tensor_type, data_shape}
which can be used for converting thebinary_data
to a tensor with a function like:fn {labels_binary, type, _shape} -> labels_binary |> Nx.from_binary(type) |> Nx.new_axis(-1) |> Nx.equal(Nx.tensor(Enum.to_list(0..9))) |> Nx.to_batched_list(32) end
:transform_labels
- similar to:transform_images
but applied to dataset labels