Turi Create  4.0
turi::object_detection::DataIterator Class Reference

#include <toolkits/object_detection/od_model_trainer.hpp>

Public Member Functions

 DataIterator (std::unique_ptr< data_iterator > impl, size_t batch_size, int offset=0)
 
bool HasNext () const override
 
DataBatch Next () override
 
std::shared_ptr< IteratorPublisher< DataBatch > > AsPublisher ()
 

Detailed Description

Wrapper adapting object_detection::data_iterator to the Iterator interface.

Definition at line 188 of file od_model_trainer.hpp.

Constructor & Destructor Documentation

◆ DataIterator()

turi::object_detection::DataIterator::DataIterator ( std::unique_ptr< data_iterator impl,
size_t  batch_size,
int  offset = 0 
)
inline
Parameters
implThe object_detection::data_iterator to wrap
batch_sizeThe number of images to request from impl for each batch.
offsetThe number of batches to skip. The first batch produced will have an iteration_id one more than the offset.

Definition at line 199 of file od_model_trainer.hpp.

Member Function Documentation

◆ AsPublisher()

std::shared_ptr<IteratorPublisher<DataBatch > > turi::neural_net::Iterator< DataBatch >::AsPublisher ( )
inlineinherited

Returns a Publisher wrapping this Iterator.

Definition at line 49 of file combine_iterator.hpp.

◆ HasNext()

bool turi::object_detection::DataIterator::HasNext ( ) const
inlineoverridevirtual

Returns true as long as the underlying sequence contains more values.

Implements turi::neural_net::Iterator< DataBatch >.

Definition at line 205 of file od_model_trainer.hpp.

◆ Next()

DataBatch turi::object_detection::DataIterator::Next ( )
overridevirtual

Returns the next value in the sequence. May throw on error.

Implements turi::neural_net::Iterator< DataBatch >.


The documentation for this class was generated from the following file: