abstract class MXNet::Gluon::Data::DownloadedDataset(T, U, V)

Overview

Abstract base class for MNIST, CIFAR10, etc.

Subclasses must define #get_data, which returns arrays of data and labels for the dataset.

Direct Known Subclasses

Defined in:

mxnet/gluon/data/dataset.cr

Constructors

Instance Method Summary

Instance methods inherited from class MXNet::Gluon::Data::Dataset(V)

size size, transform(lazy = true, &proc : T -> U) forall U transform, unsafe_fetch(idx) unsafe_fetch

Constructor Detail

def self.new(root, transform : Proc(T, U, V)? = nil) #

Creates a new instance.

Parameters

  • root (String) Directory in which to cache downloaded files. Automatically created if it does not already exist.
  • transform (Proc, optional) Optional transformation to apply to each returned sample.

[View source]

Instance Method Detail

def root #

[View source]
def size #
Description copied from module Indexable(V)

Returns the number of elements in this container.


[View source]
def unsafe_fetch(idx) #

[View source]