Function mindspore::dataset::FakeImage

Function Documentation

inline std::shared_ptr<FakeImageDataset> mindspore::dataset::FakeImage(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 = nullptr)

Function to create a FakeImageDataset. \notes The generated dataset has two columns [“image”, “label”].

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 (default=nullptr which means no cache is used).

Returns

Shared pointer to the current FakeImageDataset.