/usr/local/lib64/python3.6/site-packages/caffe2/python/__pycache__
NameSizeModeActions
allcompare_test.cpython-36.pyc27100644editdlrm
attention.cpython-36.pyc49380644editdlrm
benchmark_generator.cpython-36.pyc39100644editdlrm
binarysize.cpython-36.pyc48530644editdlrm
brew.cpython-36.pyc38490644editdlrm
brew_test.cpython-36.pyc104520644editdlrm
build.cpython-36.pyc3400644editdlrm
cached_reader.cpython-36.pyc29540644editdlrm
caffe_translator.cpython-36.pyc241650644editdlrm
caffe_translator_test.cpython-36.pyc29290644editdlrm
checkpoint.cpython-36.pyc279730644editdlrm
checkpoint_test.cpython-36.pyc94620644editdlrm
cnn.cpython-36.pyc84350644editdlrm
context.cpython-36.pyc40080644editdlrm
context_test.cpython-36.pyc26650644editdlrm
control.cpython-36.pyc144660644editdlrm
control_ops_grad.cpython-36.pyc163650644editdlrm
control_ops_grad_test.cpython-36.pyc15020644editdlrm
control_ops_util.cpython-36.pyc83320644editdlrm
control_test.cpython-36.pyc118700644editdlrm
convert.cpython-36.pyc1480644editdlrm
convert_test.cpython-36.pyc5680644editdlrm
convnet_benchmarks.cpython-36.pyc129450644editdlrm
convnet_benchmarks_test.cpython-36.pyc10900644editdlrm
core.cpython-36.pyc944280644editdlrm
core_gradients_test.cpython-36.pyc248250644editdlrm
core_test.cpython-36.pyc339420644editdlrm
crf.cpython-36.pyc76220644editdlrm
crf_predict.cpython-36.pyc10440644editdlrm
crf_viterbi_test.cpython-36.pyc16770644editdlrm
dataio.cpython-36.pyc239780644editdlrm
dataio_test.cpython-36.pyc132670644editdlrm
dataset.cpython-36.pyc128790644editdlrm
data_parallel_model.cpython-36.pyc514160644editdlrm
data_parallel_model_test.cpython-36.pyc389230644editdlrm
data_workers.cpython-36.pyc131420644editdlrm
data_workers_test.cpython-36.pyc45220644editdlrm
db_file_reader.cpython-36.pyc53610644editdlrm
db_test.cpython-36.pyc13280644editdlrm
device_checker.cpython-36.pyc40140644editdlrm
dyndep.cpython-36.pyc15680644editdlrm
embedding_generation_benchmark.cpython-36.pyc42030644editdlrm
experiment_util.cpython-36.pyc32330644editdlrm
extension_loader.cpython-36.pyc5430644editdlrm
fakefp16_transform_lib.cpython-36.pyc5460644editdlrm
filler_test.cpython-36.pyc9250644editdlrm
functional.cpython-36.pyc35310644editdlrm
functional_test.cpython-36.pyc41320644editdlrm
fused_8bit_rowwise_conversion_ops_test.cpython-36.pyc36310644editdlrm
gradient_checker.cpython-36.pyc106220644editdlrm
gradient_check_test.cpython-36.pyc167880644editdlrm
gru_cell.cpython-36.pyc25960644editdlrm
hip_test_util.cpython-36.pyc6690644editdlrm
hsm_util.cpython-36.pyc18230644editdlrm
hypothesis_test.cpython-36.pyc843120644editdlrm
hypothesis_test_util.cpython-36.pyc200390644editdlrm
ideep_test_util.cpython-36.pyc10810644editdlrm
layers_test.cpython-36.pyc573720644editdlrm
layer_model_helper.cpython-36.pyc216410644editdlrm
layer_model_instantiator.cpython-36.pyc36650644editdlrm
layer_parameter_sharing_test.cpython-36.pyc56260644editdlrm
layer_test_util.cpython-36.pyc52730644editdlrm
lazy.cpython-36.pyc4240644editdlrm
lazy_dyndep.cpython-36.pyc24750644editdlrm
lazy_dyndep_test.cpython-36.pyc48070644editdlrm
lengths_reducer_fused_8bit_rowwise_ops_test.cpython-36.pyc43920644editdlrm
lengths_reducer_rowwise_8bit_ops_test.cpython-36.pyc36840644editdlrm
lstm_benchmark.cpython-36.pyc72820644editdlrm
memonger.cpython-36.pyc321700644editdlrm
memonger_test.cpython-36.pyc231000644editdlrm
mkl_test_util.cpython-36.pyc11910644editdlrm
model_device_test.cpython-36.pyc33760644editdlrm
model_helper.cpython-36.pyc186180644editdlrm
model_helper_test.cpython-36.pyc19910644editdlrm
modifier_context.cpython-36.pyc26500644editdlrm
muji.cpython-36.pyc55660644editdlrm
muji_test.cpython-36.pyc35670644editdlrm
net_builder.cpython-36.pyc267860644editdlrm
net_builder_test.cpython-36.pyc92550644editdlrm
net_drawer.cpython-36.pyc100560644editdlrm
net_printer.cpython-36.pyc143670644editdlrm
net_printer_test.cpython-36.pyc33230644editdlrm
nomnigraph.cpython-36.pyc51250644editdlrm
nomnigraph_test.cpython-36.pyc145910644editdlrm
nomnigraph_transformations.cpython-36.pyc24310644editdlrm
nomnigraph_transformations_test.cpython-36.pyc40730644editdlrm
normalizer.cpython-36.pyc19410644editdlrm
normalizer_context.cpython-36.pyc15530644editdlrm
normalizer_test.cpython-36.pyc8700644editdlrm
numa_benchmark.cpython-36.pyc18860644editdlrm
numa_test.cpython-36.pyc16260644editdlrm
observer_test.cpython-36.pyc41810644editdlrm
operator_fp_exceptions_test.cpython-36.pyc13050644editdlrm
optimizer.cpython-36.pyc456060644editdlrm
optimizer_context.cpython-36.pyc20080644editdlrm
optimizer_test.cpython-36.pyc247470644editdlrm
optimizer_test_util.cpython-36.pyc68080644editdlrm
parallelize_bmuf_distributed_test.cpython-36.pyc69900644editdlrm
parallel_workers.cpython-36.pyc91480644editdlrm
parallel_workers_test.cpython-36.pyc38240644editdlrm
pipeline.cpython-36.pyc129400644editdlrm
pipeline_test.cpython-36.pyc27150644editdlrm
predictor_constants.cpython-36.pyc3040644editdlrm
python_op_test.cpython-36.pyc105020644editdlrm
queue_util.cpython-36.pyc50550644editdlrm
record_queue.cpython-36.pyc42250644editdlrm
recurrent.cpython-36.pyc98930644editdlrm
regularizer.cpython-36.pyc186040644editdlrm
regularizer_context.cpython-36.pyc15620644editdlrm
regularizer_test.cpython-36.pyc88250644editdlrm
rnn_cell.cpython-36.pyc447850644editdlrm
schema.cpython-36.pyc417630644editdlrm
schema_test.cpython-36.pyc137870644editdlrm
scope.cpython-36.pyc26000644editdlrm
scope_test.cpython-36.pyc40680644editdlrm
session.cpython-36.pyc73460644editdlrm
session_test.cpython-36.pyc23530644editdlrm
sparse_to_dense_mask_test.cpython-36.pyc52980644editdlrm
sparse_to_dense_test.cpython-36.pyc30030644editdlrm
task.cpython-36.pyc222070644editdlrm
task_test.cpython-36.pyc11780644editdlrm
test_util.cpython-36.pyc37290644editdlrm
text_file_reader.cpython-36.pyc22390644editdlrm
timeout_guard.cpython-36.pyc31060644editdlrm
toy_regression_test.cpython-36.pyc23600644editdlrm
transformations.cpython-36.pyc18330644editdlrm
transformations_test.cpython-36.pyc96080644editdlrm
tt_core.cpython-36.pyc64680644editdlrm
tt_core_test.cpython-36.pyc18240644editdlrm
utils.cpython-36.pyc122450644editdlrm
utils_test.cpython-36.pyc14160644editdlrm
visualize.cpython-36.pyc60270644editdlrm
workspace.cpython-36.pyc226900644editdlrm
workspace_test.cpython-36.pyc290550644editdlrm
_import_c_extension.cpython-36.pyc15240644editdlrm
__init__.cpython-36.pyc26070644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/caffe2/python/__pycache__/dataio.cpython-36.pyc (23978B)
3 Eg[@sdZddlmZddlmZmZmZddlZddl Z Gddde Z Gddde Z Gd d d e Z Gd d d e ZGd dde ZGddde ZGddde ZGdddeZddZGdddeZGddde ZGddde ZGddde ZdS)a Defines the base interface for reading and writing operations. Readers/Writers are objects that produce operations that read/write sequences of data. Each operation reads or writes a list of BlobReferences. Readers and Writers must be implemented such that read and write operations are atomic and thread safe. Examples of possible Readers and Writers: QueueReader, QueueWriter, DatasetReader, DatasetWriter, See `dataset.py` for an example of implementation. )core)FieldStructfrom_blob_listNc@sdeZdZdZdddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ dddZ dS)Readera Reader is an abstract class to be implemented in order to provide operations capable of iterating through a dataset or stream of data. A Reader must implement at least one operation, `read`, which adds operations to a net that read the next batch of data. Readers can optionally support the `reset` operation, which is useful when multiple passes over the data are required. NcCs |dk rt|tst||_dS)N) isinstancerAssertionError_schema)selfschemar @/usr/local/lib64/python3.6/site-packages/caffe2/python/dataio.py__init__'szReader.__init__cCs|jdk std|jS)Nz$Schema not provided for this reader.)r r)r r r r r ,sz Reader.schemacCs ||_dS)N)r )r r r r r _set_schema0szReader._set_schemacCsdS)zSetup nets to run at task initialization and cleanup time. Args: global_init_net: A net invoked at task init time. global_finish_net: A net invoked at task cleanup time. Nr )r init_net finish_netr r r setup_ex3szReader.setup_excCstjd}|gf|j|S)N reader_body)rNetread)r local_init_netlocal_finish_netread_netr r r read_ex<s zReader.read_excCs.|j||\}}}|jr$t|j|}|||fS)N)rr r)r rrnets should_stopfieldsr r r read_record_ex@s  zReader.read_record_excCs tddS)a!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: read_net: the net that will be appended with read operations Returns: A tuple (should_stop, fields), with: should_stop: BlobReference pointing to a boolean scalar blob that indicates whether the read operation was succesfull or whether the end of data has been reached. fields: A tuple of BlobReference containing the latest batch of data that was read. zReaders must implement `read`.N)NotImplementedError)r rr r r rGsz Reader.readcCs tddS)zAppend operations to `net` that will reset the reader. This can be used to read the data multiple times. Not all readers support this operation. zThis reader cannot be resetted.N)r)r netr r r reset]sz Reader.resetcCs(|j|\}}|jr t|j|}||fS)N)rr r)r rrrr r r read_recordes zReader.read_recordcCsPtj|p d}|j|\}}|dk r2|j||g}tjdj|||d}||fS)aQCreate an execution step with a net containing read operators. The execution step will contain a `stop_blob` that knows how to stop the execution loop when end of data was reached. E.g.: read_step, fields = reader.execution_step() consume_net = core.Net('consume') consume_net.Print(fields[0], []) p = core.Plan('reader') p.AddStep(read_step.AddNet(consume_net)) core.RunPlan(p) Args: reader_net_name: (optional) the name of the reader_net to be created. The execution step will be named accordingly. Returns: A tuple (read_step, fields), with: read_step: A newly created execution step containing a net with read operations. The step will have `stop_blob` set, in order to stop the loop on end of data. fields: A tuple of BlobReference containing the latest batch of data that was read. readerNz{}_step)Zshould_stop_blob)rrr!Orexecution_stepformat)r Zreader_net_nameZexternal_should_stopZ reader_netrrZ read_stepr r r r$kszReader.execution_step)N)NN)__name__ __module__ __qualname____doc__rr rrrrrr r!r$r r r r rs   rc@sNeZdZdZdZddZddZddZd d Zd d Z dd dZ ddZ dS)Writeraq Writer is an abstract class to be implemented in order to provide operations capable of feeding a data stream or a dataset. A Writer must implement 2 operations: `write`, which adds operations to a net that write the write batch of data, and `commit`, which adds operations to a net in order to indicate that no more data will be written. NcCs|jS)N)r )r r r r r sz Writer.schemacCs tddS)aZAdd operations to `writer_net` that write the next batch of data. Operations added to the net must be thread-safe and unique, that is: multiple writers must be able to write to the dataset in parallel. Args: fields: a tuple of BlobReference containing the batch of data to write. zWriters must implement write.N)r)r writer_netrr r r writes z Writer.writecCs(t|tr||_|j}|j||dS)N)rrr field_blobsr,)r r+rr r r write_records zWriter.write_recordcCs|j|dS)zExperimental, don't use yetN)commit)r rrr r r rszWriter.setup_excCstjd}|j|||gS)z6Experimental extension to the interface. Don't use yet write_net)rrr,)r rrr stop_blobr0r r r write_exs  zWriter.write_excCsBt|tr||_|j}|dkr*|jd}|j||||}||fS)z7Experimental extension to the interface. Don't use yet.NZdequeue_status)rrr r-NextNamer2)r rrrr1Z write_netsr r r write_record_exs   zWriter.write_record_excCsdS)zAdd operations to `finish_net` that signal end of data. This must be implemented by all Writers, but may be no-op for some of them. Nr )r rr r r r/sz Writer.commit)N) r&r'r(r)r r r,r.rr2r4r/r r r r r*s   r*c@s(eZdZdZddZddZddZdS) ReaderBuilderz1 Allow usage of a reader in distributed fashion. cCs tdS)N)r)r r r r r szReaderBuilder.schemacKs tdS)z Optionally, perform one-time setup before calling new_reader(). Subclass should make sure this function is only called once. N)r)r kwargsr r r setupszReaderBuilder.setupcKs tdS)N)r)r r6r r r new_readerszReaderBuilder.new_readerN)r&r'r(r)r r7r8r r r r r5sr5c@s0eZdZdZddZddZddZdd Zd S) PipedReaderBuilderaReaderBuilder that modifies underlying builder by calling `piper` function on each new reader produced, and return the result of the function. This way, it is possible to append data processing pipelines that will be replicated for each reader that gets created. E.g.: PipedReaderBuilder( ReaderBuilder(...), lambda reader: pipe(reader, processor=my_proc)) cCs||_||_dS)N)_builder_piper)r ZbuilderZpiperr r r rszPipedReaderBuilder.__init__cCs |jjS)N)r:r )r r r r r szPipedReaderBuilder.schemacKs|jjf|S)N)r:r7)r r6r r r r7szPipedReaderBuilder.setupcKs4|jfd|jjf|i|}t|tr,|S|jS)Nr")r;r:r8rrr")r r6outputr r r r8szPipedReaderBuilder.new_readerN)r&r'r(r)rr r7r8r r r r r9s  r9c@sVeZdZdddZddZddZdd Zd d Zd d ZddZ ddZ ddZ dS)PipeNcCsd|_d|_||_||_dS)Nr) _num_writers _num_readersr _obj_key)r r Zobj_keyr r r rsz Pipe.__init__cCs|jS)N)r )r r r r r sz Pipe.schemacCsdS)Nr )r global_init_netr r r r7 sz Pipe.setupcCs tdS)N)r)r r r r r"sz Pipe.readercCs tdS)N)r)r r r r writersz Pipe.writercCs|jS)N)r?)r r r r num_readersszPipe.num_readerscCs|jS)N)r>)r r r r num_writersszPipe.num_writerscCsB|dk r|jdkr||_|jd7_|jdk r>|j|j|dS)N)r r>r@ add_attribute)r Z writer_schemaZwriter_init_netr r r _new_writers  zPipe._new_writercCs*|jd7_|jdk r&|j|j|dS)NrE)r?r@rF)r Zreader_init_netr r r _new_reader#s zPipe._new_reader)NN) r&r'r(rr r7r"rBrCrDrGrHr r r r r=s r=c@s(eZdZdZddZddZddZdS) CounterReaderz+ Reader that produces increasing integers. cCs(tj|tdtjfdd|_d|_dS)Niter)r )rrrnpZint64counterr)r r r r r+szCounterReader.__init__cCs6|jdkr2|jgdd|_|jggtjjdd|_dS)Nr) init_countF)shapedtypevalue)rL CreateCounter ConstantFillrDataTypeBOOLr)r rAglobal_finish_netr r r r0s zCounterReader.setup_excCs*tjd}|j|jgd}|g|j|gfS)NZlimited_reader_counterrE)rrZCountUprLr)r rrZ count_netrPr r r r6s zCounterReader.read_exN)r&r'r(r)rrrr r r r rI)srIc@s@eZdZdZddZddZddZdd Zd d Zd d Z dS)ReaderWithLimitBaseapAbstract 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 (false). cCsBtj||jd||_tjd|_|jj|jjd|_ d|_ dS)N)r Zreader_with_limit data_finished) rrr r"rrrAddExternalInputr3_data_finishedr)r r"r r r rFs  zReaderWithLimitBase.__init__cCs:|jg|jggdtjjd|jj|||j||dS)NF)rNrPrO)rRrYrrSrTr"r setup_limiter)r rArUr r r rNs zReaderWithLimitBase.setup_exc Csxtjd}|j|}|jj||\}}}|j|jjtjd}|j|||j|j |g|j g|g||g||fS)aReads from an underlying Reader class, but may stop due to additional constraints. 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. Args: 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). Zlimited_reader_conditionZlimited_reader_post) rrcheck_limiter_conditionr"rrr ZCopyr#rY) r rrstop_condition_netrrZlocal_data_finishedrZcheck_done_netr r r rUs      zReaderWithLimitBase.read_excCs tddS)aConfigure task level init/cleanup nets required to implement limit condition. Must be implemented by subclass. Args: global_init_net: A net invoked at task init time. global_finish_net: A net invoked at task cleanup time. z'Subclass must implement `setup_limiter`N)r)r rArUr r r rZ|sz!ReaderWithLimitBase.setup_limitercCs tddS)aConfigure a net that is invoked between reading batches to see if limit condition is met. Must be implemented by subclass. Args: stop_condition_net: A net invoked to evaluate an early termination condition. z0Subclass must implement `check_limiter_conditionN)r)r r\r r r r[sz+ReaderWithLimitBase.check_limiter_conditioncCs|jS)a 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). )rY)r r r r rWsz!ReaderWithLimitBase.data_finishedN) r&r'r(r)rrrrZr[rWr r r r rV<s'  rVcs2eZdZdZd fdd ZddZddZZS) ReaderWithLimitzReader that stops after `num_iter` batches. If `num_iter` <= 0 or is None, reverts to an unconstrained reader that exports a boolean blob indicating that the reader has exhausted the data steam. rEcs@tt|j|d|_||_|jdk r<|jj|jjd|_dS)ayClass initializer. Args: reader: The underlying reader object doing the actual read. num_iter: Number of batches to read. If `None`, the class reverts to a normal reader except that it also produces a data_finished blob as a side effect to indicate whether the input stream is exhausted. NrL)superr]rrLnum_iterrrXr3)r r"r_) __class__r r rs  zReaderWithLimit.__init__cCs$|jr |jg|jgt|jddS)N)rM)rLrQintr_)r rArUr r r rZszReaderWithLimit.setup_limitercCs2|jr|j|jgdS|jgdgdtjjdSdS)NrEF)rNrPrO)rLZ CountDownrRrrSrT)r r\r r r r[s z'ReaderWithLimit.check_limiter_condition)rE)r&r'r(r)rrZr[ __classcell__r r )r`r r]sr]cCs tt|S)N)r]rI)r_r r r CountUntilsrccs2eZdZdZd fdd ZddZddZZS) ReaderWithTimeLimitzReader that stops after `duration` seconds. If `duration` <= 0 or is None, reverts to an unconstrained reader that exports a boolean blob indicating that the reader has exhausted the data steam. rcs&tt|j|d|_||_d|_dS)aClass initializer. Args: reader: The underlying reader object doing the actual read. duration: Number of seconds to read. If un-specified, None, or <= 0, the class reverts to a normal reader except that it also produces a data_finished blob as a side effect to indicate whether the input stream is exhausted. N)r^rdrtimerdurationduration_ns_blob)r r"rf)r`r r rs zReaderWithTimeLimit.__init__cCsd|jdk r`|jdkr`t|jd}|jgdd|_|j|j}|j|g|d|_|j|jggdS)Nr Z epoch_timer)Z counter_name)rPiʚ;)rfraZ TimerBeginreTimerGetrRrgZTimerEnd)r rArUZ duration_ns start_timer r r rZs  z!ReaderWithTimeLimit.setup_limitercCsF|jr*|j|j}|j||jgt|jS|jgdgdtj j dSdS)NrEF)rNrPrO) rfrjreZGErgstrrrRrrSrT)r r\Z time_elapsedr r r r[s  z+ReaderWithTimeLimit.check_limiter_condition)r)r&r'r(r)rrZr[rbr r )r`r rds rdc@s(eZdZdZddZddZddZdS) ReaderWithDelayz?Test reader class that inserts a delay between reading batches.cCs tj||jd||_||_dS)N)r )rrr r"delay)r r"rnr r r rszReaderWithDelay.__init__cCs|jj||dS)N)r"r)r rArUr r r rszReaderWithDelay.setup_excs:tjd}fdd}|j|gg|gfjj|S)NrcstjjdS)N)timesleeprn)argsZargd)r r r sleep_opsz)ReaderWithDelay.read_ex..sleep_op)rrPythonr"r)r rrrrrr )r r rs  zReaderWithDelay.read_exN)r&r'r(r)rrrr r r r rmsrmcs8eZdZdZfddZddZddZdd ZZS) CompositeReaderzu Base class for a reader that wrap multiple readers, e.g., reading from multiple sources simultaneously. csJt|t|ksttt|jtddt||Dd||_||_dS)z Args: names: list[str] names of readers; used as schema keys readers: list[Reader] Reader instances, must have schema cSsg|]\}}||jfqSr )r ).0namer"r r r sz,CompositeReader.__init__..)r N) lenrr^rtrrzip_names_readers)r namesreaders)r`r r r s  zCompositeReader.__init__cCs x|jD]}|j||qWdS)N)r{r)r rrr"r r r rs zCompositeReader.setup_excCsg}g}g}xNt|j|jD]<\}}|j||\}} } |j| |j||j| jqWg} |d} xZt|j||D]H\}}} | j|| | krqxtjdj |}|j | | g| | j|qxW| | |fS)z7 Stops when one of the reader finished rEz{}_stop) ryrzr{rappendextendr-rrr%r#)r rrrZ stop_blobsZall_sub_read_netsrvr"Z sub_read_netsrrecordZ read_netsZlocal_should_stopr1Zstop_netr r r rs&   zCompositeReader.read_excCsx|jD]}|j|qWdS)N)r{r )r rr"r r r r ;s zCompositeReader.reset) r&r'r(r)rrrr rbr r )r`r rts  rtcs8eZdZdZfddZddZddZdd ZZS) CompositeReaderBuilderz. A reader builder for CompositeReader cs8tt|j||_||_tddt||D|_dS)z Args: names: list[str] names of readers; used as schema keys reader_builders: list[ReaderBuilder] ReaderBuilder instances; must have schema cSsg|]\}}||jfqSr )r )rurvreader_builderr r r rwOsz3CompositeReaderBuilder.__init__..N)r^rrrz_reader_buildersrryr )r r|Zreader_builders)r`r r rDs zCompositeReaderBuilder.__init__cCs|jS)N)r )r r r r r SszCompositeReaderBuilder.schemac Ksi}d|kr|jd}nd}xt|jD]\}}|t|jdkrR|dk rR||d<|jf|}t|jt|j@}t|jt|j@}|tkstdj ||tkstdj ||j |q(W|S)NlimiterrEzOverlapping keys: {}zOverlapping values: {}) pop enumeraterrxr7setkeysvaluesrr%update) r r6Zdata_finished_blobsrirZsub_reader_data_finished_blobsZoverlapping_keysZoverlapping_valuesr r r r7Vs  zCompositeReaderBuilder.setupcKstg}xL|jD]B}|jf|}t|tr(nt|dr<|j}ntd|j|q Wt|j |}|j |j kspt |S)Nr"z,reader must be an instance of Reader or Pipe) rr8rrhasattrr" ValueErrorrrtrzr r r)r r6r}rr"Z multi_readerr r r r8ms      z!CompositeReaderBuilder.new_reader) r&r'r(r)rr r7r8rbr r )r`r r@s  r)r)Z caffe2.pythonrZcaffe2.python.schemarrrZnumpyrKroobjectrr*r5r9r=rIrVr]rcrdrmrtrr r r r s" u@!&^&.9