| 7 | namespace test { |
| 8 | |
| 9 | TEST_F(NAIVE, MASKEDFILL) { |
| 10 | Checker<MaskedFill> checker(handle(), true); |
| 11 | |
| 12 | MaskedFill::Param param; |
| 13 | param.value = 0.2; |
| 14 | |
| 15 | checker.set_param(param).exect( |
| 16 | Testcase{ |
| 17 | TensorValue( |
| 18 | {2, 3, 2, 1}, dtype::Float32(), |
| 19 | {3.3179, 0.109, -0.5855, 0.2566, -1.2897, 1.2683, -2.0587, |
| 20 | 0.0711, -0.1169, 0.2509, -0.2393, 0.0876}), // input |
| 21 | TensorValue({2}, dtype::Bool(), {false, true}), // hx |
| 22 | {}}, |
| 23 | Testcase{ |
| 24 | {}, |
| 25 | {}, |
| 26 | TensorValue( |
| 27 | {2, 3, 2, 1}, dtype::Float32(), |
| 28 | {3.3179, 0.109, -0.5855, 0.2566, -1.2897, 1.2683, 0.2, 0.2, |
| 29 | 0.2, 0.2, 0.2, 0.2}), // output |
| 30 | }); |
| 31 | checker.set_param(param).exect( |
| 32 | Testcase{ |
| 33 | TensorValue( |
| 34 | {1, 3, 1, 2}, dtype::Float32(), |
| 35 | {-2.4348, -1.7948, 0.5223, 0.0932, -0.2955, |
| 36 | -0.0492}), // input |
| 37 | TensorValue({1, 3}, dtype::Bool(), {false, true, false}), // hx |
| 38 | {}, |
| 39 | }, |
| 40 | Testcase{ |
| 41 | {}, |
| 42 | {}, |
| 43 | TensorValue( |
| 44 | {1, 3, 1, 2}, dtype::Float32(), |
| 45 | {-2.4348, -1.7948, 0.2, 0.2, -0.2955, -0.0492}), |
| 46 | }); |
| 47 | } |
| 48 | |
| 49 | } // namespace test |
| 50 | } // namespace megdnn |
nothing calls this directly
no test coverage detected