Class BatchDataset

Inheritance Relationships

Base Type

Class Documentation

class BatchDataset : public mindspore::dataset::Dataset

The result of applying Batch operator to the input dataset.

Public Functions

BatchDataset(const std::shared_ptr<Dataset> &input, int32_t batch_size, bool drop_remainder = false)

Constructor of BatchDataset.

Note

Combines batch_size number of consecutive rows into batches.

Parameters
  • input[in] The dataset which need to apply batch operation.

  • batch_size[in] The number of rows each batch is created with.

  • drop_remainder[in] Determines whether or not to drop the last possibly incomplete batch. If true, and if there are less than batch_size rows available to make the last batch, then those rows will be dropped and not propagated to the next node.

~BatchDataset() override = default

Destructor of BatchDataset.