MCPcopy Create free account
hub / github.com/pytorch/pytorch / _test_net

Method _test_net

caffe2/python/layers_test.py:198–210  ·  view source on GitHub ↗

Helper function to assert the net contains some set of operations and then to run the net. Inputs: net -- the network to test and run ops_list -- the list of operation specifications to check for in the net

(self, net, ops_list)

Source from the content-addressed store, hash-verified

196 self.model.add_output_schema('scalar', schema.Struct())
197
198 def _test_net(self, net, ops_list):
199 '''
200 Helper function to assert the net contains some set of operations and
201 then to run the net.
202
203 Inputs:
204 net -- the network to test and run
205 ops_list -- the list of operation specifications to check for
206 in the net
207 '''
208 ops_output = self.assertNetContainOps(net, ops_list)
209 workspace.RunNetOnce(net)
210 return ops_output
211
212 def testFCWithoutBias(self):
213 output_dims = 2

Callers 3

Calls 1

assertNetContainOpsMethod · 0.80

Tested by

no test coverage detected