Class USPSDataset

Inheritance Relationships

Base Type

Class Documentation

class USPSDataset : public mindspore::dataset::Dataset

A source dataset that reads and parses USPS datasets.

Public Functions

USPSDataset(const std::vector<char> &dataset_dir, const std::vector<char> &usage, int64_t num_samples, ShuffleMode shuffle, int32_t num_shards, int32_t shard_id, const std::shared_ptr<DatasetCache> &cache)

Constructor of USPSDataset.

Parameters
  • dataset_dir[in] Path to the root directory that contains the dataset.

  • usage[in] Usage of USPS, can be “train”, “test” or “all”.

  • num_samples[in] The number of samples to be included in the dataset.

  • shuffle[in] The mode for shuffling data every epoch. Can be any of: ShuffleMode.kFalse - No shuffling is performed. ShuffleMode.kFiles - Shuffle files only. ShuffleMode.kGlobal - Shuffle both the files and samples.

  • num_shards[in] Number of shards that the dataset should be divided into.

  • shard_id[in] The shard ID within num_shards. This argument should be specified only when num_shards is also specified (Default = 0).

  • cache[in] Tensor cache to use (default=nullptr which means no cache is used).

~USPSDataset() override = default

Destructor of USPSDataset.