(self)
| 135 | self.assertTrue(res) |
| 136 | |
| 137 | def testConcatNCHW(self): |
| 138 | for input_size, d1, d2, d3, d4 in self.test_configs: |
| 139 | op = core.CreateOperator("Concat", |
| 140 | ["X1", "X2", "X3", "X4"], |
| 141 | ["Y", "Y_dims"], |
| 142 | order="NCHW" |
| 143 | ) |
| 144 | Xs = [ |
| 145 | np.random.rand(2, d1, input_size, |
| 146 | input_size).astype(np.float32), |
| 147 | np.random.rand(2, d2, input_size, |
| 148 | input_size).astype(np.float32), |
| 149 | np.random.rand(2, d3, input_size, |
| 150 | input_size).astype(np.float32), |
| 151 | np.random.rand(2, d4, input_size, input_size).astype(np.float32) |
| 152 | ] |
| 153 | for i in range(4): |
| 154 | res = device_checker.CheckSimple(op, Xs, [0]) |
| 155 | self.assertTrue(res) |
| 156 | for checker in gradient_checkers: |
| 157 | res, grad, grad_estimated = checker.CheckSimple(op, Xs, i, |
| 158 | [0]) |
| 159 | self.assertTrue(res) |
| 160 | |
| 161 | |
| 162 | class TestRelu(test_util.TestCase): |
nothing calls this directly
no test coverage detected