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

Function TEST_F

tensorflow/core/kernels/gather_op_test.cc:53–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51};
52
53TEST_F(GatherOpTest, ScalarIndices) {
54 MakeOp(DT_FLOAT, DT_INT32);
55
56 // Feed and run
57 AddInputFromArray<float>(TensorShape({5}), {0, 1, 2, 3, 4});
58 AddInputFromArray<int32>(TensorShape({}), {3});
59 AddInputFromArray<int32>(TensorShape({}), {0});
60 TF_ASSERT_OK(RunOpKernel());
61
62 // Check the output.
63 Tensor expected(allocator(), DT_FLOAT, TensorShape({}));
64 test::FillValues<float>(&expected, {3});
65 test::ExpectTensorEqual<float>(expected, *GetOutput(0));
66}
67
68TEST_F(GatherOpTest, ScalarIndices_Complex) {
69 MakeOp(DT_COMPLEX64, DT_INT32);

Callers

nothing calls this directly

Calls 4

GetOutputFunction · 0.85
TensorShapeClass · 0.50
StrContainsFunction · 0.50
ToStringMethod · 0.45

Tested by

no test coverage detected