Class RandomDataDataset

Inheritance Relationships

Base Type

Class Documentation

class RandomDataDataset : public mindspore::dataset::Dataset

A source dataset that generates random data.

Public Functions

RandomDataDataset(const int32_t &total_rows, std::shared_ptr<SchemaObj> schema, const std::vector<std::vector<char>> &columns_list, const std::shared_ptr<DatasetCache> &cache)

Constructor of RandomDataDataset.

Parameters
  • total_rows[in] Number of rows for the dataset to generate (default=0, number of rows is random).

  • schema[in] SchemaObj to set column type, data type and data shape.

  • columns_list[in] List of columns to be read (default={}, read all columns).

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

RandomDataDataset(const int32_t &total_rows, const std::vector<char> &schema_path, const std::vector<std::vector<char>> &columns_list, const std::shared_ptr<DatasetCache> &cache)

Constructor of RandomDataDataset.

Parameters
  • total_rows[in] Number of rows for the dataset to generate (default=0, number of rows is random).

  • schema_path[in] Path of schema file.

  • columns_list[in] List of columns to be read (default={}, read all columns).

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

~RandomDataDataset() override = default

Destructor of RandomDataDataset.