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

Method testCombineConditions

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

Source from the content-addressed store, hash-verified

295 self.CheckNetAllOutput(bool_net, [True, False])
296
297 def testCombineConditions(self):
298 # combined by 'Or'
299 combine_net = control.CombineConditions(
300 'test', [self.true_cond_net_, self.false_cond_net_], 'Or')
301 step = control.Do('combine',
302 self.true_cond_net_,
303 self.false_cond_net_,
304 combine_net)
305 self.BuildAndRunPlan(step)
306 self.CheckNetOutput([(combine_net, True)])
307
308 # combined by 'And'
309 combine_net = control.CombineConditions(
310 'test', [self.true_cond_net_, self.false_cond_net_], 'And')
311 step = control.Do('combine',
312 self.true_cond_net_,
313 self.false_cond_net_,
314 combine_net)
315 self.BuildAndRunPlan(step)
316 self.CheckNetOutput([(combine_net, False)])
317
318 def testMergeConditionNets(self):
319 # merged by 'Or'

Callers

nothing calls this directly

Calls 2

BuildAndRunPlanMethod · 0.95
CheckNetOutputMethod · 0.95

Tested by

no test coverage detected