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

Method CheckNetAllOutput

caffe2/python/control_test.py:69–78  ·  view source on GitHub ↗

Check the net output is expected expects is a list of bools.

(self, net, expects)

Source from the content-addressed store, hash-verified

67 self.assertEqual(output, expect)
68
69 def CheckNetAllOutput(self, net, expects):
70 """
71 Check the net output is expected
72 expects is a list of bools.
73 """
74 self.assertEqual(len(net.Proto().external_output), len(expects))
75 for i in range(len(expects)):
76 output = workspace.FetchBlob(
77 net.Proto().external_output[i])
78 self.assertEqual(output, expects[i])
79
80 def BuildAndRunPlan(self, step):
81 plan = core.Plan("test")

Callers 1

testBoolNetMethod · 0.95

Calls 3

rangeFunction · 0.50
assertEqualMethod · 0.45
ProtoMethod · 0.45

Tested by

no test coverage detected