| 43 | }; |
| 44 | |
| 45 | TEST_F(ReluTest, Smoke) { |
| 46 | OperationType op_type = OperationType::RELU; |
| 47 | ReLUAttributes attr; |
| 48 | attr.clip = 0; |
| 49 | attr.alpha = 0; |
| 50 | SingleOpModel model({ToString(op_type), attr}, {GetTensorRef(0)}, |
| 51 | {GetTensorRef(1)}); |
| 52 | ASSERT_TRUE(model.PopulateTensor(0, {-6.0, 0.0, 2.0, 8.0})); |
| 53 | ASSERT_OK(model.Invoke(*NewReLUNodeShader())); |
| 54 | EXPECT_THAT(model.GetOutput(0), |
| 55 | Pointwise(FloatNear(1e-6), {0.0, 0.0, 2.0, 8.0})); |
| 56 | } |
| 57 | |
| 58 | TEST_F(ReluTest, ClipOnly) { |
| 59 | OperationType op_type = OperationType::RELU; |
nothing calls this directly
no test coverage detected