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

Function TEST

tensorflow/lite/kernels/log_softmax_test.cc:61–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59};
60
61TEST(LogSoftmaxOpTest, SimpleTest) {
62 LogSoftmaxOpModel m(/*batches=*/2, /*size=*/5);
63 m.SetInput({
64 1.0, 2.0, 3.0, 4.0, 5.0, // b = 0
65 -1.0, -2.0, -3.0, -4.0, -5.0, // b = 1
66 });
67
68 m.Invoke();
69
70 EXPECT_THAT(
71 m.GetOutput(),
72 ElementsAreArray(ArrayFloatNear(
73 {-4.45191431, -3.45191431, -2.45191431, -1.45191443, -0.4519144,
74 -0.4519144, -1.45191443, -2.45191431, -3.45191431, -4.45191431},
75 1e-6)));
76}
77
78TEST(LogSoftmaxOpTest, CompareWithTFmini) {
79 const int batch_size = 2;

Callers

nothing calls this directly

Calls 9

RuntimeShapeClass · 0.85
ArrayFloatNearFunction · 0.70
LogSoftmaxFunction · 0.50
SetInputMethod · 0.45
InvokeMethod · 0.45
GetOutputMethod · 0.45
getMethod · 0.45
insertMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected