Class PullIterator
Defined in File iterator.h
Inheritance Relationships
Base Type
public mindspore::dataset::Iterator
Class Documentation
-
class PullIterator : public mindspore::dataset::Iterator
Public Functions
-
PullIterator()
Constructor.
-
virtual ~PullIterator()
Destructor.
-
Status GetNextRow(MSTensorVec *const row) override
Function to get next row from the data pipeline.
说明
Type of return data is a vector(without column name).
- 参数
row – [out] The output tensor row.
- 返回
Status error code, returns OK if no error encountered else false.
样例/* dataset is an instance of Dataset object */ std::shared_ptr<Iterator> = dataset->CreatePullBasedIterator(); std::vector<mindspore::MSTensor> row; iter->GetNextRow(&row);
-
Status GetRows(int32_t num_rows, std::vector<MSTensorVec> *const row)
Function to get specified rows from the data pipeline.
说明
Type of return data is a vector(without column name). This behavior is subject to change.
- 参数
num_rows – [in] The number of rows to fetch.
row – [out] The output tensor row.
- 返回
Status error code, returns OK if no error encountered else false.
样例/* dataset is an instance of Dataset object */ std::shared_ptr<Iterator> = dataset->CreatePullBasedIterator(); std::vector<std::vector<mindspore::MSTensor>> rows; iter->GetNextRow(5, &rows);
Method for building and launching the pipeline.
说明
Consider making this function protected.
- 参数
ds – [in] The root node that calls the function.
num_epochs – [in] Number of epochs passed down to EpochCtrlNode (default=-1, which means infinite epochs).
- 返回
Status error code, returns OK if no error encountered.
-
PullIterator()