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

Function TEST

tensorflow/lite/kernels/cast_test.cc:46–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44};
45
46TEST(CastOpModel, CastInt32ToFloat) {
47 CastOpModel m({TensorType_INT32, {2, 3}}, {TensorType_FLOAT32, {2, 3}});
48 m.PopulateTensor<int32_t>(m.input(), {100, 200, 300, 400, 500, 600});
49 m.Invoke();
50 EXPECT_THAT(m.ExtractVector<float>(m.output()),
51 ElementsAreArray({100.f, 200.f, 300.f, 400.f, 500.f, 600.f}));
52}
53
54TEST(CastOpModel, CastFloatToInt32) {
55 CastOpModel m({TensorType_FLOAT32, {3, 2}}, {TensorType_INT32, {3, 2}});

Callers

nothing calls this directly

Calls 3

outputMethod · 0.65
inputMethod · 0.45
InvokeMethod · 0.45

Tested by

no test coverage detected