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

Function _CopyConditionBlobNet

caffe2/python/control.py:153–167  ·  view source on GitHub ↗

Make a condition net that copies the condition_blob Args: condition_blob is a single bool. returns not_net: the net NOT the input out_blob: the output blob of the not_net

(condition_blob)

Source from the content-addressed store, hash-verified

151
152
153def _CopyConditionBlobNet(condition_blob):
154 """Make a condition net that copies the condition_blob
155
156 Args:
157 condition_blob is a single bool.
158
159 returns
160 not_net: the net NOT the input
161 out_blob: the output blob of the not_net
162 """
163 condition_net = core.Net('copy_condition_blob_net')
164 out_blob = condition_net.Copy(condition_blob)
165 condition_net.AddExternalOutput(out_blob)
166
167 return condition_net, out_blob
168
169
170def MergeConditionNets(name, condition_nets, relation):

Callers 2

CombineConditionsFunction · 0.85
_RunOnceIfNotFunction · 0.85

Calls 2

AddExternalOutputMethod · 0.95
NetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…