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

Method testSwitchNot

caffe2/python/control_test.py:272–279  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

270 self.CheckNetOutput([(self.cnt_net_, 0), (self.cnt_2_net_, 2)])
271
272 def testSwitchNot(self):
273 step = control.SwitchNot(
274 'mySwitchNot',
275 (self.false_cond_net_, self.cnt_net_),
276 (self.true_cond_net_, self.cnt_2_net_)
277 )
278 self.BuildAndRunPlan(step)
279 self.CheckNetOutput([(self.cnt_net_, 1), (self.cnt_2_net_, 0)])
280
281 def testBoolNet(self):
282 bool_net = control.BoolNet(('a', True))

Callers

nothing calls this directly

Calls 2

BuildAndRunPlanMethod · 0.95
CheckNetOutputMethod · 0.95

Tested by

no test coverage detected