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

Function TEST_P

tensorflow/lite/kernels/conv_test.cc:143–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141};
142
143TEST_P(ConvolutionOpTest, SimpleTestFloat32) {
144 ConvolutionOpModel m(GetRegistration(), {TensorType_FLOAT32, {2, 2, 4, 1}},
145 {TensorType_FLOAT32, {3, 2, 2, 1}},
146 {TensorType_FLOAT32, {}});
147
148 m.SetInput({
149 // First batch
150 1, 1, 1, 1, // row = 1
151 2, 2, 2, 2, // row = 2
152 // Second batch
153 1, 2, 3, 4, // row = 1
154 1, 2, 3, 4, // row = 2
155 });
156 m.SetFilter({
157 1, 2, 3, 4, // first 2x2 filter
158 -1, 1, -1, 1, // second 2x2 filter
159 -1, -1, 1, 1, // third 2x2 filter
160 });
161 m.SetBias({1, 2, 3});
162
163 m.Invoke();
164
165 EXPECT_THAT(m.GetOutput(), ElementsAreArray({
166 18, 2, 5, // first batch, left
167 18, 2, 5, // first batch, right
168 17, 4, 3, // second batch, left
169 37, 4, 3, // second batch, right
170 }));
171}
172
173TEST_P(ConvolutionOpTest, SimpleTestFloat32SingleThreaded) {
174 ConvolutionOpModel m(GetRegistration(), {TensorType_FLOAT32, {2, 2, 4, 1}},

Callers

nothing calls this directly

Calls 10

GetParamFunction · 0.85
SetSignedFilterMethod · 0.80
ArrayFloatNearFunction · 0.70
SetInputMethod · 0.45
SetFilterMethod · 0.45
SetBiasMethod · 0.45
InvokeMethod · 0.45
GetOutputMethod · 0.45
SetNumThreadsMethod · 0.45
GetDequantizedOutputMethod · 0.45

Tested by

no test coverage detected