Caffe2 - Python API
A deep learning, cross platform ML framework
Public Member Functions | Public Attributes | List of all members
caffe2.python.dataio.ReaderWithLimitBase Class Reference
Inheritance diagram for caffe2.python.dataio.ReaderWithLimitBase:
caffe2.python.dataio.Reader caffe2.python.dataio.ReaderWithLimit caffe2.python.dataio.ReaderWithTimeLimit

Public Member Functions

def __init__ (self, reader)
def setup_ex (self, global_init_net, global_finish_net)
def read_ex (self, local_init_net, local_finish_net)
def setup_limiter (self, global_init_net, global_finish_net)
def check_limiter_condition (self, stop_condition_net)
def data_finished (self)
- Public Member Functions inherited from caffe2.python.dataio.Reader
def __init__ (self, schema=None)
def schema (self)
def setup_ex (self, init_net, finish_net)
def read_ex (self, local_init_net, local_finish_net)
def read_record_ex (self, local_init_net, local_finish_net)
def read (self, read_net)
def reset (self, net)
def read_record (self, read_net)
def execution_step (self, reader_net_name=None, external_should_stop=None)

Public Attributes


Detailed Description

Abstract Reader constrained by certain conditions.

Base class for Reader classes which check for certain conditions to stop
further processing (e.g. max number of iterations or time limit).
Also produces a boolean blob (data_finished) that can be used to see if
the reader exausted all input data (true) or stopped for another reason

Definition at line 315 of file

Member Function Documentation

def caffe2.python.dataio.ReaderWithLimitBase.check_limiter_condition (   self,
Configure a net that is invoked between reading batches to see if
limit condition is met. Must be implemented by subclass.

    stop_condition_net: A net invoked to evaluate an early termination

Definition at line 389 of file

def caffe2.python.dataio.ReaderWithLimitBase.data_finished (   self)
Return a blob that can be checked after the end of the reading task,
which will contain a scalar float indicating whether the underlying
reader has been exhausted (True) or whether we stopped because reached
the limit of iterations (False).

Definition at line 399 of file

def caffe2.python.dataio.ReaderWithLimitBase.read_ex (   self,
Reads from an underlying Reader class, but may stop due to additional

Build and return network(s) to read data from a Reader with
additional constraints, depending on which derived class is used.
Derived classes implement setup_limited and check_limiter_condition
which determine the nature of the constraint imposed on the reader,
e.g. iteration limits or time limit.

    local_init_net: A net invoked at task instance init time (Once per
parallel thread).
    local_finish_net: A net invoked at task instance cleanup time (Once
per parallel thread).

Definition at line 340 of file

def caffe2.python.dataio.ReaderWithLimitBase.setup_limiter (   self,
Configure task level init/cleanup nets required to implement limit
condition. Must be implemented by subclass.

    global_init_net: A net invoked at task init time.
    global_finish_net: A net invoked at task cleanup time.

Definition at line 379 of file

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