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

Public Member Functions

def __init__ (self, original_reader, db_path, db_type='LevelDB', name=None, batch_size=100)
 
def build_cache_step (self, overwrite=False)
 
- Public Member Functions inherited from caffe2.python.db_file_reader.DBFileReader
def __init__ (self, db_path, db_type, name=None, batch_size=100, loop_over=False, field_names=None)
 
def setup_ex (self, init_net, finish_net)
 
def read (self, read_net)
 
- 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

 original_reader
 
- Public Attributes inherited from caffe2.python.db_file_reader.DBFileReader
 db_path
 
 db_type
 
 name
 
 batch_size
 
 loop_over
 
 ds
 
 ds_reader
 

Static Public Attributes

string default_name_suffix = 'cached_reader'
 
- Static Public Attributes inherited from caffe2.python.db_file_reader.DBFileReader
string default_name_suffix = 'db_file_reader'
 

Detailed Description

Definition at line 16 of file cached_reader.py.

Member Function Documentation

def caffe2.python.cached_reader.CachedReader.build_cache_step (   self,
  overwrite = False 
)
Build a step for generating cache DB file.

    If self.db_path exists and not overwritting, build an empty step.
    Overwise, build a step as follows.
    Pipe original reader to the _DatasetWriter,
    so that dataset field blobs are populated.
    Then save these blobs into a file.

    Args:
overwrite: bool. If true, ignore the existing file
    and build a new one overwritting the existing one anyway.

    Returns:
build_cache_step: ExcutionStep.
    The step to be run for building a cache DB file.

Definition at line 85 of file cached_reader.py.


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