(self)
| 70 | self.test_configs = [(6, 10), (3, 13), ] |
| 71 | |
| 72 | def testLRN(self): |
| 73 | for input_size, depth in self.test_configs: |
| 74 | op = core.CreateOperator("LRN", |
| 75 | ["X"], |
| 76 | ["Y", "Y_scale"], |
| 77 | size=11, |
| 78 | alpha=0.001, |
| 79 | beta=0.5, |
| 80 | bias=2.0, |
| 81 | order="NHWC" |
| 82 | ) |
| 83 | X = np.random.rand(2, input_size, input_size, |
| 84 | depth).astype(np.float32) |
| 85 | res = device_checker.CheckSimple(op, [X], [0]) |
| 86 | self.assertTrue(res) |
| 87 | for checker in gradient_checkers: |
| 88 | res, grad, grad_estimated = checker.CheckSimple(op, [X], 0, [0]) |
| 89 | self.assertTrue(res) |
| 90 | |
| 91 | |
| 92 | class TestFlatten(test_util.TestCase): |
nothing calls this directly
no test coverage detected