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

Method IfNet

caffe2/python/net_builder.py:336–340  ·  view source on GitHub ↗

Same as If, but uses 'If' operator instead of execution step logic

(self, cond, name=None)

Source from the content-addressed store, hash-verified

334 return NetBuilder.current().add(_RunIf(cond, name=name))
335
336 def IfNet(self, cond, name=None):
337 """
338 Same as If, but uses 'If' operator instead of execution step logic
339 """
340 return NetBuilder.current().add(_RunIfNet(cond, name=name))
341
342 def Else(self, name=None):
343 """

Callers 3

test_if_netMethod · 0.80
testIfMethod · 0.80
testWhileMethod · 0.80

Calls 3

_RunIfNetClass · 0.85
currentMethod · 0.80
addMethod · 0.45

Tested by 3

test_if_netMethod · 0.64
testIfMethod · 0.64
testWhileMethod · 0.64