|
def | __init__ (self, original_reader, db_path, db_type='LevelDB', name=None, batch_size=100) |
|
def | build_cache_step (self, overwrite=False) |
|
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) |
|
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) |
|
|
| original_reader |
|
| db_path |
|
| db_type |
|
| name |
|
| batch_size |
|
| loop_over |
|
| ds |
|
| ds_reader |
|
|
string | default_name_suffix = 'cached_reader' |
|
string | default_name_suffix = 'db_file_reader' |
|
Definition at line 16 of file cached_reader.py.
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: