Downloaders

Base Classes

fuel.downloaders.base.default_downloader(directory, urls, filenames, url_prefix=None, clear=False)[source]

Downloads or clears files from URLs and filenames.

Parameters:
  • directory (str) – The directory in which downloaded files are saved.
  • urls (list) – A list of URLs to download.
  • filenames (list) – A list of file names for the corresponding URLs.
  • url_prefix (str, optional) – If provided, this is prepended to filenames that lack a corresponding URL.
  • clear (bool, optional) – If True, delete the given filenames from the given directory rather than download them.
fuel.downloaders.base.download(url, file_handle, chunk_size=1024)[source]

Downloads a given URL to a specific file.

Parameters:
  • url (str) – URL to download.
  • file_handle (file) – Where to save the downloaded URL.
fuel.downloaders.base.ensure_directory_exists(directory)[source]

Create directory (with parents) if does not exist, raise on failure.

Parameters:directory (str) – The directory to create
fuel.downloaders.base.filename_from_url(url, path=None)[source]

Parses a URL to determine a file name.

Parameters:url (str) – URL to parse.
fuel.downloaders.base.progress_bar(*args, **kwds)[source]

Manages a progress bar for a download.

Parameters:
  • name (str) – Name of the downloaded file.
  • maxval (int) – Total size of the download, in bytes.

Adult

fuel.downloaders.adult.fill_subparser(subparser)[source]

Set up a subparser to download the adult dataset file.

The Adult dataset file adult.data and adult.test is downloaded from the UCI Machine Learning Repository [UCIADULT].

[UCIADULT]https://archive.ics.uci.edu/ml/datasets/Adult
Parameters:subparser (argparse.ArgumentParser) – Subparser handling the adult command.

CalTech 101 Silhouettes

fuel.downloaders.caltech101_silhouettes.fill_subparser(subparser)[source]

Sets up a subparser to download the Silhouettes dataset files.

The following CalTech 101 Silhouette dataset files can be downloaded from Benjamin M. Marlin’s website [MARLIN]: caltech101_silhouettes_16_split1.mat and caltech101_silhouettes_28_split1.mat.

[MARLIN]https://people.cs.umass.edu/~marlin/data.shtml
Parameters:subparser (argparse.ArgumentParser) – Subparser handling the caltech101_silhouettes command.
fuel.downloaders.caltech101_silhouettes.silhouettes_downloader(size, **kwargs)[source]

Binarized MNIST

fuel.downloaders.binarized_mnist.fill_subparser(subparser)[source]

Sets up a subparser to download the binarized MNIST dataset files.

The binarized MNIST dataset files (binarized_mnist_{train,valid,test}.amat) are downloaded from Hugo Larochelle’s website [HUGO].

[HUGO]http://www.cs.toronto.edu/~larocheh/public/datasets/ binarized_mnist/binarized_mnist_{train,valid,test}.amat
Parameters:subparser (argparse.ArgumentParser) – Subparser handling the binarized_mnist command.

CIFAR100

fuel.downloaders.cifar100.fill_subparser(subparser)[source]

Sets up a subparser to download the CIFAR-100 dataset file.

The CIFAR-100 dataset file is downloaded from Alex Krizhevsky’s website [ALEX].

[ALEX]http://www.cs.toronto.edu/~kriz/cifar-100-python.tar.gz
Parameters:subparser (argparse.ArgumentParser) – Subparser handling the cifar100 command.

CIFAR10

fuel.downloaders.cifar10.fill_subparser(subparser)[source]

Sets up a subparser to download the CIFAR-10 dataset file.

The CIFAR-10 dataset file is downloaded from Alex Krizhevsky’s website [ALEX].

Parameters:subparser (argparse.ArgumentParser) – Subparser handling the cifar10 command.

IRIS

fuel.downloaders.iris.fill_subparser(subparser)[source]

Set up a subparser to download the Iris dataset file.

The Iris dataset file iris.data is downloaded from the UCI Machine Learning Repository [UCIIRIS].

Parameters:subparser (argparse.ArgumentParser) – Subparser handling the iris command.

MNIST

fuel.downloaders.mnist.fill_subparser(subparser)[source]

Sets up a subparser to download the MNIST dataset files.

The following MNIST dataset files are downloaded from Yann LeCun’s website [LECUN]: train-images-idx3-ubyte.gz, train-labels-idx1-ubyte.gz, t10k-images-idx3-ubyte.gz, t10k-labels-idx1-ubyte.gz.

Parameters:subparser (argparse.ArgumentParser) – Subparser handling the mnist command.

SVHN

fuel.downloaders.svhn.fill_subparser(subparser)[source]

Sets up a subparser to download the SVHN dataset files.

The SVHN dataset files ({train,test,extra}{.tar.gz,_32x32.mat}) are downloaded from the official website [SVHNSITE].

Parameters:subparser (argparse.ArgumentParser) – Subparser handling the svhn command.
fuel.downloaders.svhn.svhn_downloader(which_format, directory, clear=False)[source]