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

Function RunNet

caffe2/python/workspace.py:252–267  ·  view source on GitHub ↗

Runs a given net. Inputs: name: the name of the net, or a reference to the net. num_iter: number of iterations to run allow_fail: if True, does not assert on net exec failure but returns False Returns: True or an exception.

(name, num_iter=1, allow_fail=False)

Source from the content-addressed store, hash-verified

250
251
252def RunNet(name, num_iter=1, allow_fail=False):
253 """Runs a given net.
254
255 Inputs:
256 name: the name of the net, or a reference to the net.
257 num_iter: number of iterations to run
258 allow_fail: if True, does not assert on net exec failure but returns False
259 Returns:
260 True or an exception.
261 """
262 return CallWithExceptionIntercept(
263 C.run_net,
264 C.Workspace.current._last_failed_op_net_position,
265 GetNetName(name),
266 StringifyNetName(name), num_iter, allow_fail,
267 )
268
269
270def RunPlan(plan_or_step):

Callers

nothing calls this directly

Calls 3

GetNetNameFunction · 0.85
StringifyNetNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…