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

Function TEST

tensorflow/cc/framework/gradient_checker_test.cc:41–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39using ops::Unstack;
40
41TEST(GradientCheckerTest, BasicFloat) {
42 Scope scope = Scope::NewRootScope();
43 TensorShape shape({2, 4, 3});
44 auto x = Placeholder(scope, DT_FLOAT, Placeholder::Shape(shape));
45 auto y = Square(scope, x);
46 float max_error;
47 TF_ASSERT_OK((ComputeGradientError<float, float, float>(
48 scope, {x}, {shape}, {y}, {shape}, &max_error)));
49 EXPECT_LT(max_error, 1e-4);
50}
51
52TEST(GradientCheckerTest, BasicDouble) {
53 Scope scope = Scope::NewRootScope();

Callers

nothing calls this directly

Calls 15

isnanClass · 0.85
StackClass · 0.85
PlaceholderFunction · 0.50
ShapeClass · 0.50
SquareFunction · 0.50
ComplexFunction · 0.50
RealFunction · 0.50
DivFunction · 0.50
SubFunction · 0.50
ConstFunction · 0.50
MatMulFunction · 0.50
SplitFunction · 0.50

Tested by

no test coverage detected