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

Method Elif

caffe2/python/net_builder.py:601–604  ·  view source on GitHub ↗
(self, cond, name=None)

Source from the content-addressed store, hash-verified

599 return r
600
601 def Elif(self, cond, name=None):
602 assert not self._is_else, 'Else not allowed for an Else.'
603 return NetBuilder.current().add(_RunIf(
604 cond, name=name or self.name, _already_ran=self._already_ran))
605
606 def Else(self, name=None):
607 assert not self._is_else, 'Elif not allowed for an Else.'

Callers 2

_actual_loopMethod · 0.80
example_loopFunction · 0.80

Calls 3

_RunIfClass · 0.85
currentMethod · 0.80
addMethod · 0.45

Tested by 2

_actual_loopMethod · 0.64
example_loopFunction · 0.64