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

Function Do

caffe2/python/control.py:255–271  ·  view source on GitHub ↗

Execute the sequence of nets or steps once. Examples: - Do('myDo', net1, net2, ..., net_n) - Do('myDo', list_of_nets) - Do('myDo', step1, step2, ..., step_n) - Do('myDo', list_of_steps)

(name, *nets_or_steps)

Source from the content-addressed store, hash-verified

253
254
255def Do(name, *nets_or_steps):
256 """
257 Execute the sequence of nets or steps once.
258
259 Examples:
260 - Do('myDo', net1, net2, ..., net_n)
261 - Do('myDo', list_of_nets)
262 - Do('myDo', step1, step2, ..., step_n)
263 - Do('myDo', list_of_steps)
264 """
265 nets_or_steps = _MakeList(nets_or_steps)
266 if (len(nets_or_steps) == 1 and isinstance(
267 nets_or_steps[0], core.ExecutionStep)):
268 return nets_or_steps[0]
269 else:
270 return core.scoped_execution_step(
271 _get_next_step_name('Do', name), nets_or_steps)
272
273
274def DoParallel(name, *nets_or_steps):

Callers 9

_PrependNetsFunction · 0.85
_AppendNetsFunction · 0.85
_RunOnceIfFunction · 0.85
ForFunction · 0.85
WhileFunction · 0.85
DoWhileFunction · 0.85
DoUntilFunction · 0.85
IfFunction · 0.85
IfNotFunction · 0.85

Calls 3

_MakeListFunction · 0.85
isinstanceFunction · 0.85
_get_next_step_nameFunction · 0.85

Tested by

no test coverage detected