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

Method Condition

caffe2/python/net_builder.py:359–365  ·  view source on GitHub ↗

Loop's condition, executed within WhileNet context

(self, name=None)

Source from the content-addressed store, hash-verified

357 return NetBuilder.current().add(_RunWhileNet(name=name))
358
359 def Condition(self, name=None):
360 """
361 Loop's condition, executed within WhileNet context
362 """
363 assert isinstance(NetBuilder.current(), _RunWhileNet), \
364 "Use of Condition outside of WhileNet"
365 return _RunWhileCondition(name=name)
366
367 def task_init(self):
368 """

Callers 5

__init__Method · 0.80
__init__Method · 0.80
test_while_netMethod · 0.80
testWhileMethod · 0.80

Calls 3

isinstanceFunction · 0.85
_RunWhileConditionClass · 0.85
currentMethod · 0.80

Tested by 2

test_while_netMethod · 0.64
testWhileMethod · 0.64