MCPcopy Create free account
hub / github.com/pytorch/pytorch / stop

Method stop

caffe2/python/net_builder.py:251–260  ·  view source on GitHub ↗

Stop execution of the current execution step. Example: ops.Print(a, 0) ops.stop() ops.Print(b, 0) In the example, 'b' will never be printed.

(self)

Source from the content-addressed store, hash-verified

249 return tg
250
251 def stop(self):
252 """
253 Stop execution of the current execution step.
254 Example:
255 ops.Print(a, 0)
256 ops.stop()
257 ops.Print(b, 0)
258 In the example, 'b' will never be printed.
259 """
260 return self.stop_if(ops.Const(True))
261
262 def stop_if(self, blob):
263 """

Callers 1

__exit__Method · 0.45

Calls 2

stop_ifMethod · 0.95
ConstMethod · 0.80

Tested by

no test coverage detected