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

Function TEST_F

tensorflow/core/kernels/roll_op_test.cc:52–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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