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

Method test_run_map

caffe2/python/predictor/predictor_test.py:65–73  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

63 np.testing.assert_almost_equal(np.dot(A, B), outputs[0])
64
65 def test_run_map(self):
66 A = np.zeros((2, 3), np.float32)
67 B = np.ones((3, 4), np.float32)
68 predictor = workspace.Predictor(self.init_net, self.predict_net)
69 outputs = predictor.run({
70 'B': B,
71 })
72 self.assertEqual(len(outputs), 1)
73 np.testing.assert_almost_equal(np.dot(A, B), outputs[0])

Callers

nothing calls this directly

Calls 5

dotMethod · 0.80
zerosMethod · 0.45
onesMethod · 0.45
runMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected