Scidata.MNIST (Scidata v0.1.1) View Source
Module for downloading the MNIST dataset.
Link to this section Summary
Functions
Downloads the MNIST training dataset or fetches it locally.
Downloads the MNIST test dataset or fetches it locally.
Link to this section Functions
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_datato 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_imagesbut applied to dataset labels
Downloads the MNIST test dataset or fetches it locally.
Accepts the same options as download/1.