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

Public Member Functions

def __init__ (self, reader, num_iter=1)
 
def setup_ex (self, global_init_net, global_finish_net)
 
def read_ex (self, local_init_net, local_finish_net)
 
def data_finished (self)
 
- Public Member Functions inherited from 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

 reader
 
 counter
 
 num_iter
 

Detailed Description

Reader that stops after `num_iter` calls.

If num_iter is None it becomes just a simple reader that exports a global
flag for "out of data".

Definition at line 319 of file dataio.py.

Member Function Documentation

◆ data_finished()

def dataio.ReaderWithLimit.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 374 of file dataio.py.

◆ read_ex()

def dataio.ReaderWithLimit.read_ex (   self,
  local_init_net,
  local_finish_net 
)
1. check if we reached number of iterations and populate the same
should_stop blob 

Definition at line 346 of file dataio.py.


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