/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__/pipeline.cpython-36.pyc (12940B)
3 EgC@sddlmZmZddlmZmZddlmZmZddl m Z m Z ddl m Z mZmZGdddeZdZd d Zd!d d ZddZd"ddZd#ddZddZddZddZd$ddZGdddeZGdd d eZd S)%)core queue_util)ReaderWriter) NetBuilderops) as_recordField)NodeTask TaskGroupc@seZdZdZdddZdS)Outputz Represents the result of a processor function. A processor can either return an Output, or it can return a record, in which case an Output will be created for it afterwards. NcCs|tjj}|dks(t|dks(td|dkr4|}t|tjrF|g}|dkrRgnt||_ |dkrhdnt ||_ ||_ dS)Nrz7Cannot both use `ops` syntax and return a list of nets.) rcurrentgetlenAssertionError isinstancerNetlistnetsrrecord should_stop)selfrrrZbuilder_childrenrB/usr/local/lib64/python3.6/site-packages/caffe2/python/pipeline.py__init__s  zOutput.__init__)NNN)__name__ __module__ __qualname____doc__rrrrrr sr dcCs|dkr*tj|dk r|ntd}|j}nTt|trN|dksDtdd}|}n0t|drv|dkshtd|}|j}ntd|j ||||fS)N)capacityzcapacity would not be used.writerz)output must be a reader, queue or stream.) rQueueDEFAULT_QUEUE_CAPACITYr"rrrhasattr ValueErrorsetup_ex)outputr!global_init_netglobal_exit_net out_queuer"rrr _init_output%s       r,NcsRdkrddSttjr$tSdk rJtdrJfdd}|_SdS)NcSs|S)Nr)recrrr<sz make_processor.. schema_funccs jS)N)r/r) processorreaderrrprocessor_schemaAsz(make_processor..processor_schema)rrr NetProcessorr%schema)r0r1r2r)r0r1rmake_processor:s r5cCs|t|tr|St|tr"t|dSt|trpt|dkoTt|dtoTt|dtj}|rftd|St|Snt|SdS)z Allow for processors to return results in several formats. TODO(azzolini): simplify once all processors use NetBuilder API. )rrN)N)rr r tuplerr BlobReference)r(Zis_record_and_blobrrrnormalize_processor_outputHs       r:r7c Cst||||||||\}} |S)a] Given a Reader, Queue or DataStream in `input`, and optionally, a Writer, Queue or DataStream in `output`, creates a Task that, when run, will pipe the input into the output, using multiple parallel threads. Additionally, if a processor is given, it will be called between reading and writing steps, allowing it to transform the record. Args: input: either a Reader, Queue or DataStream that will be read until a stop is signaled either by the reader or the writer. output: either a Writer, a Queue or a DataStream that will be written to as long as neither reader nor writer signal a stop condition. If output is not provided or is None, a Queue is created with given `capacity` and written to. num_threads: number of concurrent threads used for processing and piping. If set to 0, no Task is created, and a reader is returned instead -- the reader returned will read from the reader passed in and process it. ** DEPRECATED **. Use `num_runtime_threads` instead. This option will be removed once all readers/processors support `num_runtime_threads`. processor: (optional) function that takes an input record and optionally returns a record; this will be called between read and write steps. If the processor does not return a record, a writer will not be instantiated. Processor can also be a core.Net with input and output records properly set. In that case, a NetProcessor is instantiated, cloning the net for each of the threads. name: (optional) name of the task to be created. capacity: when output is not passed, a queue of given `capacity` is created and written to. group: (optional) explicitly add the created Task to this TaskGroup, instead of using the currently active one. num_runtime_threads: Similar to `num_threads`, but instead of expanding the tasks with a `for` loop in python, does that at runtime. This is preferable to `num_threads`, but some processors/readers still require to be called multiple times in python. Returns: Output Queue, DataStream, Reader, or None, depending on the parameters passed. ) _pipe_step) inputr( num_threadsr0namer!groupnum_runtime_threadsresult_rrrpipecs/ rCc Cs\|dks tt||||||||| \} } d}|dk rT| j}t|ttfkrT|d}| |fS)aq Similar to `pipe`, with the additional ability for the pipe Task to return output values to the `Session` once done. Returns: Tuple (out_queue, *task_outputs) out_queue: same as return value of `pipe`. task_outputs: TaskOutput object, fetchable from the client after session.run() returns. rN)rr;outputstyperr8) r<r(r=r0r>r!r?r@ final_outputsrAtaskrrrpipe_and_outputs  rHcCsTt|dr|jSt|drL|jdkr*|jSt|drFd|jj|jfS|jS|jjS)Nr> func_namezim_classz%s.%s)r%r>rIrrJr __class__)r0rrrprocessor_names    rLc%Csttj}dj|d|tr"ttnd|r0t|nd}t||||d|} tjd} tjd} |j | | tjd} tjd } |j | | \}}}| j g|ggd tj j d |dk rt||| | \}}|j|| | |\}}nd}g}tjtj| WdQRXtjtj| WdQRXtjd }|jg|d }tjd}|j|gtjtjd|gt|t||g|dtj|tjtj| WdQRXtjtj| WdQRXWdQRX|| fS)Nz{0}/{1}/{2}/{3}/{4}rCNoInputNoOutput)r>r?rDZ num_instancesz pipe:exitz pipe:initzpipe:instance:initzpipe:instance:exitF)shapevaluedtype timer_start) counter_name timer_endbody)should_stop_blob)strr rformatr<rLr rrr'read_record_ex ConstantFillDataTypeBOOLr,write_record_exrZ task_initnetZtask_instance_init TimerBeginTimerEndexecution_steprZtask_instance_exitZ task_exit)r>r?rFr1r=r(r! node_name profiler_namerGr*r)init_netexit_net read_netsstatusr-r+r" write_netsrBtimer_start_nettimer timer_end_netrrr_runtime_threads_tasks\                 rlcCsttj}dj|d|tr"ttnd|r0t|nd}t|||d} tjd} tjd} |j | | d} d} g}xPt |D]B}t d|d }tjd}tjd}|j ||\}}}|j g|ggd tjjd |dk r,| dkrt | jd t||| | \} } WdQRX| j||||\}}ng}tjd }|jg|d}tjd}|j|gtj|tjtjd|gt|t||g|dtj|tj|WdQRX|jtj|qWtj| tjtjd|ddtj| WdQRX| | fS)Nz{0}/{1}/{2}/{3}/{4}rCrMrN)r>r?rDexitinitzt:%d)r>F)rOrPrQ)Z _fullnamerR)rSrTrU)rVT)Zconcurrent_substeps)rWr rrXr<rLr rrr'rangerrYrZr[r\r>r,r]r_r`rr^rarappendZto_execution_step)r>r?rFr1r=r(r!rbrcrGr*r)r+r"Zsteps thread_idnbrdrerfrgr-rhrBrirjrkrrr_static_threads_tasksf                rsc Cs|dks|dkstdt|tr(|} n&t|dr<|j} ntdjt||dk r`t| |} |dksp|dkr|dks|t| dfS|dkr|dk rt |}|dkr|dk rdt |}|dkrdt |}|dkrt |||| |||St |||| |||SdS) z r7z;Only one of num_threads or num_runtime_threads must be set.r1z/Input must be a reader, queue or stream. Got {}Nrz pipe_into:%sz pipe_from:%s) rrrr%r1r&rXrEProcessingReaderrLrsrl) r<r(r=r0r>r!r?r@rFr1rrrr;:s2        r;c@s0eZdZdZddZddZddZdd Zd S) rtzo Reader that reads from an upstream reader, calls the processor, and returns the processed record. cCs tj|||_t|||_dS)N)rrr1r5r0)rr1r0rrrrfs zProcessingReader.__init__cCs |jjS)N)r0r4)rrrrr4kszProcessingReader.schemacCs|jj||dS)N)r1r')rrdZ finish_netrrrr'nszProcessingReader.setup_exc Cs|jj||\}}}t}t|j|}WdQRX||j7}|jsJ|jrtj d}|jrn|j ||jg|g|jr|j ||jg|g|j |t |jdr|j tj|j|j|j|jr|jjnd} ||| fS)Nstop_netsetup)r1rYrr:r0rrZ _stop_blobrrOrrpr%Z add_attributer Z LOCAL_SETUPZ _set_schemarZ field_blobs) rrdrerfrgr-rrrArufieldsrrrread_exqs       zProcessingReader.read_exN)rrrrrr4r'ryrrrrrtas rtc@s:eZdZdZd ddZddZddZd d Zd d ZdS)r3z Processor that clones a core.Net each time it's called, executing the cloned net as the processor. It requires the Net to have input and (optionally) output records set, with net.set_input_record() and net.set_output_record(). NcCsbt|tjst|dks(t|tjs(t|p2t||_|pthread_init_netsr^ _stop_signal _blob_maps_frozen_cloned_init_nets)rr^ stop_signalrzr>rrrrs  zNetProcessor.__init__cCs |jjS)N)r^ output_record)rrrrr4szNetProcessor.schemacCsd|_|j}g|_|S)NT)r}r~)rrdZcloned_init_netsrrrrvszNetProcessor.setupc Cs|j s ttjjd}i}x6|jD],}tj|t||||\}}|j j |q&Wtj|j t|j ||||\}}|j dkrd}n.t|j |krtj |t|j |d}n|j }|jj |t|g|j|S)N/)r^)r}rrrr>rzrZclone_and_bind_netrWr~rpr^r{r9r|r r) rr-prefixZ blob_remapr^Znew_netrBZ remappingsrrrr__call__s$      zNetProcessor.__call__cCs d|_|jS)NT)r}r|)rrrr blob_mapsszNetProcessor.blob_maps)NNN) rrrrrr4rvrrrrrrr3s  r3)N)Nr7NNNNr7)Nr7NNNNr7N)Nr7NNNNNN)Z caffe2.pythonrrZcaffe2.python.dataiorrZcaffe2.python.net_builderrrZcaffe2.python.schemarr Zcaffe2.python.taskr r r objectr r$r,r5r:rCrHrLrlrsr;rtr3rrrrs(  4  <B %,