Class FakeImageDataset

Inheritance Relationships

Base Type

Class Documentation

class FakeImageDataset : public mindspore::dataset::Dataset

A source dataset for generating fake images.

Public Functions

FakeImageDataset(int32_t num_images, const std::vector<int32_t> &image_size, int32_t num_classes, int32_t base_seed, const std::shared_ptr<Sampler> &sampler, const std::shared_ptr<DatasetCache> &cache)

Constructor of FakeImageDataset.

Parameters
  • num_images – [in] The number of images to generate, which must be positive.

  • image_size – [in] Size of the images, which must be a vector of three positive values.

  • num_classes – [in] The number of classes of the images, which must be positive.

  • base_seed – [in] The base seed to generate the images.

  • sampler – [in] Shared pointer to a sampler object used to choose samples from the dataset. If sampler is not given, a RandomSampler will be used to randomly iterate the entire dataset.

  • cache – [in] Tensor cache to use.

FakeImageDataset(int32_t num_images, const std::vector<int32_t> &image_size, int32_t num_classes, int32_t base_seed, const Sampler *sampler, const std::shared_ptr<DatasetCache> &cache)

Constructor of FakeImageDataset.

Parameters
  • num_images – [in] The number of images to generate, which must be positive.

  • image_size – [in] Size of the images, which must be a vector of three positive values.

  • num_classes – [in] The number of classes of the images, which must be positive.

  • base_seed – [in] The base seed to generate the images.

  • sampler – [in] Raw pointer to a sampler object used to choose samples from the dataset.

  • cache – [in] Tensor cache to use.

FakeImageDataset(int32_t num_images, const std::vector<int32_t> &image_size, int32_t num_classes, int32_t base_seed, const std::reference_wrapper<Sampler> &sampler, const std::shared_ptr<DatasetCache> &cache)

Constructor of FakeImageDataset.

Parameters
  • num_images – [in] The number of images to generate, which must be positive.

  • image_size – [in] Size of the images, which must be a vector of three positive values.

  • num_classes – [in] The number of classes of the images, which must be positive.

  • base_seed – [in] The base seed to generate the images.

  • sampler – [in] Sampler object used to choose samples from the dataset.

  • cache – [in] Tensor cache to use.

~FakeImageDataset() override = default

Destructor of FakeImageDataset.