| 102 | #endif |
| 103 | |
| 104 | XLA_TEST_P(BatchNormalizationTest, SubtractInZ) { |
| 105 | XlaBuilder builder("subtract_in_z_one_sample"); |
| 106 | auto x = ConstantLiteral(&builder, input_literal_); |
| 107 | auto y = ConstantR1<float>(&builder, {3.14, 4.25}); |
| 108 | Sub(x, y, /*broadcast_dimensions=*/{1}); |
| 109 | |
| 110 | Array4D<float> expected(kSamples, kZ, kY, kX); |
| 111 | Array2D<float> pz({ |
| 112 | {-1.0f - 3.14f, 4.1f - 4.25f}, // p0 |
| 113 | {2.0f - 3.14f, 4.1f - 4.25f}, // p1 |
| 114 | {5.0f - 3.14f, 4.4f - 4.25f}, // p2 |
| 115 | }); |
| 116 | expected.FillWithPZ(pz); |
| 117 | ComputeAndCompareR4<float>(&builder, expected, {}, error_spec_); |
| 118 | } |
| 119 | |
| 120 | XLA_TEST_P(BatchNormalizationTest, SquareTesseractElementwise) { |
| 121 | XlaBuilder builder("square_tesseract_elementwise"); |
nothing calls this directly
no test coverage detected