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

Method testBoolNet

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

Source from the content-addressed store, hash-verified

279 self.CheckNetOutput([(self.cnt_net_, 1), (self.cnt_2_net_, 0)])
280
281 def testBoolNet(self):
282 bool_net = control.BoolNet(('a', True))
283 step = control.Do('bool', bool_net)
284 self.BuildAndRunPlan(step)
285 self.CheckNetAllOutput(bool_net, [True])
286
287 bool_net = control.BoolNet(('a', True), ('b', False))
288 step = control.Do('bool', bool_net)
289 self.BuildAndRunPlan(step)
290 self.CheckNetAllOutput(bool_net, [True, False])
291
292 bool_net = control.BoolNet([('a', True), ('b', False)])
293 step = control.Do('bool', bool_net)
294 self.BuildAndRunPlan(step)
295 self.CheckNetAllOutput(bool_net, [True, False])
296
297 def testCombineConditions(self):
298 # combined by 'Or'

Callers

nothing calls this directly

Calls 2

BuildAndRunPlanMethod · 0.95
CheckNetAllOutputMethod · 0.95

Tested by

no test coverage detected