MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / XLA_TEST_P

Function XLA_TEST_P

tensorflow/compiler/xla/tests/batch_normalization_test.cc:104–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102#endif
103
104XLA_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
120XLA_TEST_P(BatchNormalizationTest, SquareTesseractElementwise) {
121 XlaBuilder builder("square_tesseract_elementwise");

Callers

nothing calls this directly

Calls 15

ConstantLiteralFunction · 0.85
MakeShapeFunction · 0.85
TestNameFunction · 0.85
BatchNormTrainingFunction · 0.85
GetParamFunction · 0.85
ProductFunction · 0.85
BatchNormInferenceFunction · 0.85
FillWithPZMethod · 0.80
ConsumeValueOrDieMethod · 0.80
SquareFunction · 0.70
ErrorSpecClass · 0.70

Tested by

no test coverage detected