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

#include <toolkits/style_transfer/st_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 style_transfer::data_iterator to the Iterator interface.

Definition at line 100 of file st_model_trainer.hpp.

Constructor & Destructor Documentation

◆ DataIterator()

turi::style_transfer::DataIterator::DataIterator ( std::unique_ptr< data_iterator >  impl,
size_t  batch_size,
int  offset = 0 
)
inline
Parameters
implThe style_transfer::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 111 of file st_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::style_transfer::DataIterator::HasNext ( ) const
inlineoverridevirtual

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

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

Definition at line 117 of file st_model_trainer.hpp.

◆ Next()

DataBatch turi::style_transfer::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: