@@ -82,8 +82,8 @@ constexpr int kKeywordModelOpRuntimeDataSize = 148;
82
82
constexpr int kTestConvModelArenaSize = 12 * 1024 ;
83
83
uint8_t test_conv_tensor_arena[kTestConvModelArenaSize ];
84
84
85
- constexpr int kTestConvModelTensorCount = 15 ;
86
- constexpr int kTestConvModelNodeAndRegistrationCount = 7 ;
85
+ constexpr int kTestConvModelTensorCount = 13 ;
86
+ constexpr int kTestConvModelNodeAndRegistrationCount = 5 ;
87
87
88
88
#if defined(USE_TFLM_COMPRESSION)
89
89
constexpr int kKeywordModelPersistentBufferDataSize = 920 ;
@@ -101,9 +101,9 @@ constexpr int kTestConvModelOnlyTotalSize = 9576;
101
101
// Tail size contributed by the conv model excluding the
102
102
// RecordingMicroAllocator's overhead
103
103
// TODO(b/207157610): replace magic number that depends on OPs
104
- constexpr int kTestConvModelOnlyTailSize = 1832 ;
104
+ constexpr int kTestConvModelOnlyTailSize = 1672 ;
105
105
constexpr int kTestConvModelPersistentTfLiteTensorDataSize = 128 ;
106
- constexpr int kTestConvModelPersistentBufferDataSize = 748 ;
106
+ constexpr int kTestConvModelPersistentBufferDataSize = 700 ;
107
107
#else
108
108
// Total size contributed by the conv model excluding the
109
109
// RecordingMicroAllocator's overhead
@@ -112,13 +112,13 @@ constexpr int kTestConvModelOnlyTotalSize = 9832;
112
112
// Tail size contributed by the conv model excluding the
113
113
// RecordingMicroAllocator's overhead
114
114
// TODO(b/207157610): replace magic number that depends on OPs
115
- constexpr int kTestConvModelOnlyTailSize = 2088 ;
115
+ constexpr int kTestConvModelOnlyTailSize = 1928 ;
116
116
constexpr int kTestConvModelPersistentTfLiteTensorDataSize = 224 ;
117
- constexpr int kTestConvModelPersistentBufferDataSize = 740 ;
117
+ constexpr int kTestConvModelPersistentBufferDataSize = 692 ;
118
118
#endif
119
119
constexpr int kTestConvModelHeadSize = 7744 ;
120
120
constexpr int kTestConvModelOpRuntimeDataSize = 136 ;
121
- constexpr int kTestConvModelPersistentTfLiteTensorQuantizationData = 0 ;
121
+ constexpr int kTestConvModelPersistentTfLiteTensorQuantizationData = 64 ;
122
122
123
123
struct ModelAllocationThresholds {
124
124
size_t tensor_count = 0 ;
@@ -262,13 +262,11 @@ TF_LITE_MICRO_TEST(TestKeywordModelMemoryThreshold) {
262
262
}
263
263
264
264
TF_LITE_MICRO_TEST (TestConvModelMemoryThreshold) {
265
- tflite::MicroMutableOpResolver<6 > op_resolver;
265
+ tflite::MicroMutableOpResolver<4 > op_resolver;
266
266
TF_LITE_MICRO_EXPECT_EQ (op_resolver.AddConv2D (), kTfLiteOk );
267
- TF_LITE_MICRO_EXPECT_EQ (op_resolver.AddQuantize (), kTfLiteOk );
268
267
TF_LITE_MICRO_EXPECT_EQ (op_resolver.AddMaxPool2D (), kTfLiteOk );
269
268
TF_LITE_MICRO_EXPECT_EQ (op_resolver.AddReshape (), kTfLiteOk );
270
269
TF_LITE_MICRO_EXPECT_EQ (op_resolver.AddFullyConnected (), kTfLiteOk );
271
- TF_LITE_MICRO_EXPECT_EQ (op_resolver.AddDequantize (), kTfLiteOk );
272
270
273
271
tflite::RecordingMicroInterpreter interpreter (
274
272
tflite::GetModel (kTestConvModelData ), op_resolver, test_conv_tensor_arena,
0 commit comments