Class Iterator
Defined in File iterator.h
Nested Relationships
Nested Types
Inheritance Relationships
Derived Type
public mindspore::dataset::PullIterator
(Class PullIterator)
Class Documentation
-
class Iterator
Subclassed by mindspore::dataset::PullIterator
Public Functions
-
Iterator()
Constructor.
-
virtual ~Iterator()
Destructor.
Method for building and launching the pipeline.
- 参数
ds – [in] The last DatasetOp in the dataset pipeline.
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.
-
inline Status GetNextRow(MSTensorMap *row)
Function to get the next row from the data pipeline.
- Example
/* dataset is an instance of Dataset object */ std::shared_ptr<Iterator> = dataset->CreateIterator(); std::unordered_map<std::string, mindspore::MSTensor> row; iter->GetNextRow(&row);
说明
Type of return data is a unordered_map(with column name).
- 参数
row – [out] The output tensor row.
- 返回
Status error code, returns OK if no error encountered.
-
Status GetNextRowCharIF(MSTensorMapChar *row)
Char interface(CharIF) of GetNextRow.
说明
The reason for using this API is that std::string will be constrained by the compiler option ‘_GLIBCXX_USE_CXX11_ABI’ while char is free of this restriction.
-
virtual Status GetNextRow(MSTensorVec *row)
Function to get the next row from the data pipeline.
- Example
/* dataset is an instance of Dataset object */ std::shared_ptr<Iterator> = dataset->CreateIterator(); std::vector<mindspore::MSTensor> row; iter->GetNextRow(&row);
说明
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.
-
void Stop()
Function to shut down the data pipeline.
-
class _Iterator
Inter class as iterator of Iterator.
-
Iterator()