| 141 | } |
| 142 | |
| 143 | void TestMaxInput() { |
| 144 | Tensor input_tensor(DT_QUINT8, {1, 1, 2, 16}); |
| 145 | auto input = input_tensor.flat<quint8>(); |
| 146 | // Inputs are all FLT_MAX / (number of inputs). |
| 147 | input = input.setConstant(255); |
| 148 | |
| 149 | Expect(input_tensor, 0.0f, |
| 150 | std::numeric_limits<float>::max() / static_cast<float>(2 * 16), false, |
| 151 | 0.0f, 0.0f); |
| 152 | } |
| 153 | |
| 154 | void TestOutputRangeGiven() { |
| 155 | Tensor input_tensor(DT_QUINT8, {1, 4, 4, 32}); |