MCPcopy Index your code
hub / github.com/pytorch/pytorch / read

Method read

caffe2/python/dataio.py:71–91  ·  view source on GitHub ↗

Append operations to read_net that will read a batch from the underlying data soruce. Operations added to `read_net` must be thread safe and atomic, that is, it should be possible to clone `read_net` and run multiple instances of it in parallel. Args:

(self, read_net)

Source from the content-addressed store, hash-verified

69 return nets, should_stop, fields
70
71 def read(self, read_net):
72 """Append operations to read_net that will read a batch from the
73 underlying data soruce.
74
75 Operations added to `read_net` must be thread safe and atomic, that is,
76 it should be possible to clone `read_net` and run multiple instances of
77 it in parallel.
78
79 Args:
80 read_net: the net that will be appended with read operations
81
82 Returns:
83 A tuple (should_stop, fields), with:
84 should_stop: BlobReference pointing to a boolean scalar
85 blob that indicates whether the read operation
86 was succesfull or whether the end of data has
87 been reached.
88 fields: A tuple of BlobReference containing the latest batch
89 of data that was read.
90 """
91 raise NotImplementedError('Readers must implement `read`.')
92
93 def reset(self, net):
94 """Append operations to `net` that will reset the reader.

Callers 15

read_exMethod · 0.95
read_recordMethod · 0.95
__enter__Method · 0.45
runMethod · 0.45
mainFunction · 0.45
magic_traceFunction · 0.45
gen_dataFunction · 0.45
downloadMethod · 0.45
assetFilePathMethod · 0.45
assetFilePathMethod · 0.45
assetFilePathMethod · 0.45

Calls

no outgoing calls

Tested by 13

assetFilePathMethod · 0.36
assetFilePathMethod · 0.36
assetFilePathMethod · 0.36
setUpModuleFunction · 0.36
setUpMethod · 0.36
build_engine_onnxMethod · 0.36
compare_testMethod · 0.36
test_caffe2_to_onnxMethod · 0.36
test_onnx_to_caffe2Method · 0.36
test_convert_end2endMethod · 0.36
_read_minidb_entriesMethod · 0.36