(self)
| 666 | # self.assertAlmostEqual(outputs[0][0][0][0][0], 5.19026289e-05) |
| 667 | |
| 668 | def test_predictor_memory_model(self): |
| 669 | workspace.ResetWorkspace() |
| 670 | m = self._create_model() |
| 671 | workspace.FeedBlob("data", np.zeros([4], dtype="float32")) |
| 672 | self.predictor = workspace.Predictor( |
| 673 | workspace.StringifyProto(m.param_init_net.Proto()), |
| 674 | workspace.StringifyProto(m.net.Proto()), |
| 675 | ) |
| 676 | |
| 677 | inputs = np.array([1, 3, 256, 256], dtype="float32") |
| 678 | outputs = self.predictor.run([inputs]) |
| 679 | np.testing.assert_array_almost_equal( |
| 680 | np.array([[516, 516]], dtype="float32"), outputs |
| 681 | ) |
| 682 | |
| 683 | |
| 684 | class TestTransform(htu.HypothesisTestCase): |
nothing calls this directly
no test coverage detected