Template Function mindspore::dataset::RandomData

Function Documentation

template<typename T = std::shared_ptr<SchemaObj>>
std::shared_ptr<RandomDataDataset> mindspore::dataset::RandomData(const int32_t &total_rows = 0, const T &schema = nullptr, const std::vector<std::string> &columns_list = {}, const std::shared_ptr<DatasetCache> &cache = nullptr)

Function to create a RandomDataset.

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).

Returns

Shared pointer to the RandomDataset.