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

Method CheckNetOutput

caffe2/python/control_test.py:59–67  ·  view source on GitHub ↗

Check the net output is expected nets_and_expects is a list of tuples (net, expect)

(self, nets_and_expects)

Source from the content-addressed store, hash-verified

57 [], shape=[], value=0, dtype=core.DataType.INT64)
58
59 def CheckNetOutput(self, nets_and_expects):
60 """
61 Check the net output is expected
62 nets_and_expects is a list of tuples (net, expect)
63 """
64 for net, expect in nets_and_expects:
65 output = workspace.FetchBlob(
66 net.Proto().external_output[-1])
67 self.assertEqual(output, expect)
68
69 def CheckNetAllOutput(self, net, expects):
70 """

Callers 13

ForLoopTestMethod · 0.95
WhileLoopTestMethod · 0.95
UntilLoopTestMethod · 0.95
DoWhileLoopTestMethod · 0.95
DoUntilLoopTestMethod · 0.95
IfCondTestMethod · 0.95
IfElseCondTestMethod · 0.95
IfNotCondTestMethod · 0.95
IfNotElseCondTestMethod · 0.95
testSwitchMethod · 0.95
testSwitchNotMethod · 0.95
testCombineConditionsMethod · 0.95

Calls 2

ProtoMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected