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

Function TEST_F

tensorflow/core/kernels/scatter_nd_op_test.cc:78–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76// }
77
78TEST_F(ScatterNdUpdateOpTest, Simple_TwoD32) {
79 MakeOp(DT_FLOAT_REF, DT_INT32);
80
81 // Feed and run
82 AddInputFromArray<float>(TensorShape({5, 3}),
83 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0});
84 AddInputFromArray<int32>(TensorShape({3, 1}), {0, 4, 2});
85 AddInputFromArray<float>(TensorShape({3, 3}),
86 {100, 101, 102, 777, 778, 779, 10000, 10001, 10002});
87 TF_ASSERT_OK(RunOpKernel());
88
89 // Check the new state of the input
90 Tensor params_tensor = *mutable_input(0).tensor;
91 Tensor expected(allocator(), DT_FLOAT, TensorShape({5, 3}));
92 test::FillValues<float>(&expected, {100, 101, 102, 0, 0, 0, 10000, 10001,
93 10002, 0, 0, 0, 777, 778, 779});
94 test::ExpectTensorEqual<float>(expected, params_tensor);
95}
96
97TEST_F(ScatterNdUpdateOpTest, Simple_Two64) {
98 MakeOp(DT_FLOAT_REF, DT_INT64);

Callers

nothing calls this directly

Calls 3

TensorShapeClass · 0.50
StrContainsFunction · 0.50
ToStringMethod · 0.45

Tested by

no test coverage detected