Skip to content

Commit a91b807

Browse files
Fixed incorrect Init logic for ESP-NN Conv2D Kernel
- Init method was initialisating a persistent buffer equal to size of OpDataConv while the correct size would be that of NodeData which is used by ESP-NN - This had knock-on effects in other places, e.g. when running quantized MobileNetV2 model this led to the Softmax Node's beta param getting overridden.
1 parent 2312aff commit a91b807

File tree

1 file changed

+1
-1
lines changed
  • tensorflow/lite/micro/kernels/esp_nn

1 file changed

+1
-1
lines changed

tensorflow/lite/micro/kernels/esp_nn/conv.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct NodeData {
4545

4646
static void* Init(TfLiteContext* context, const char* buffer, size_t length) {
4747
TFLITE_DCHECK(context->AllocatePersistentBuffer != nullptr);
48-
return context->AllocatePersistentBuffer(context, sizeof(OpDataConv));
48+
return context->AllocatePersistentBuffer(context, sizeof(NodeData));
4949
}
5050

5151
static TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {

0 commit comments

Comments
 (0)