| 106 | }; |
| 107 | |
| 108 | TEST(PredictOpTest, AllLabelsAreValid) { |
| 109 | PredictOpModel m({4}, {5}, {5, 2}, 2, 0.0001); |
| 110 | m.SetInputSignature({1, 3, 7, 9}); |
| 111 | m.SetModelKey({1, 2, 4, 6, 7}); |
| 112 | m.SetModelLabel({11, 12, 11, 12, 11, 12, 11, 12, 11, 12}); |
| 113 | m.SetModelWeight({0.1, 0.2, 0.1, 0.2, 0.1, 0.2, 0.1, 0.2, 0.1, 0.2}); |
| 114 | m.Invoke(); |
| 115 | EXPECT_THAT(m.GetLabel(), ElementsAreArray({12, 11})); |
| 116 | EXPECT_THAT(m.GetWeight(), ElementsAreArray(ArrayFloatNear({0.1, 0.05}))); |
| 117 | } |
| 118 | |
| 119 | TEST(PredictOpTest, MoreLabelsThanRequired) { |
| 120 | PredictOpModel m({4}, {5}, {5, 2}, 1, 0.0001); |
nothing calls this directly
no test coverage detected