View Source Scidata.KuzushijiMNIST (Scidata v0.1.10)
Module for downloading the Kuzushiji-MNIST dataset.
Link to this section Summary
Functions
Downloads the Kuzushiji MNIST training dataset or fetches it locally.
Downloads the Kuzushiji MNIST test dataset or fetches it locally.
Link to this section Functions
Downloads the Kuzushiji MNIST 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)))
options
Options.
:base_url
- Dataset base URL.Defaults to
"http://codh.rois.ac.jp/kmnist/dataset/kmnist/"
:train_image_file
- Training set image filename.Defaults to
"train-images-idx3-ubyte.gz"
:train_label_file
- Training set label filename.Defaults to
"train-images-idx1-ubyte.gz"
:cache_dir
- Cache directory.Defaults to
System.tmp_dir!()
Downloads the Kuzushiji MNIST test dataset or fetches it locally.
options
Options.
:base_url
- Dataset base URL.Defaults to
"http://codh.rois.ac.jp/kmnist/dataset/kmnist/"
:test_image_file
- Test set image filename.Defaults to
"t10k-images-idx3-ubyte.gz"
:test_label_file
- Test set label filename.Defaults to
"t10k-labels-idx1-ubyte.gz"
:cache_dir
- Cache directory.Defaults to
System.tmp_dir!()