| 87 | } |
| 88 | |
| 89 | TEST(FloatSubOpModel, NoActivation) { |
| 90 | FloatSubOpModel m({TensorType_FLOAT32, {1, 2, 2, 1}}, |
| 91 | {TensorType_FLOAT32, {1, 2, 2, 1}}, |
| 92 | {TensorType_FLOAT32, {}}, ActivationFunctionType_NONE); |
| 93 | m.PopulateTensor<float>(m.input1(), {-2.0, 0.2, 1.7, 0.5}); |
| 94 | m.PopulateTensor<float>(m.input2(), {0.1, 0.2, 0.3, 0.8}); |
| 95 | m.Invoke(); |
| 96 | EXPECT_THAT(m.GetOutput(), |
| 97 | ElementsAreArray(ArrayFloatNear({-2.1, 0.0, 1.4, -0.3}))); |
| 98 | } |
| 99 | |
| 100 | TEST(FloatSubOpModel, ActivationRELU_N1_TO_1) { |
| 101 | FloatSubOpModel m( |
nothing calls this directly
no test coverage detected