Compilation error on my library that l build when l was doing object detection

Help fix this error

c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp: In function 'TfLiteStatus tflite::{anonymous}::Prepare(TfLiteContext*, TfLiteNode*)':
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp:1789:67: error: either all initializer clauses should be designated or none of them should be
 1789 |                                 .channels = input->dims->data[3], 1
      |                                                                   ^
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp:1793:68: error: either all initializer clauses should be designated or none of them should be
 1793 |                                 .channels = output->dims->data[3], 1
      |                                                                    ^
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp:1795:80: error: either all initializer clauses should be designated or none of them should be
 1795 |     data_dims_t filter_dims = {.width = filter_width, .height = filter_height, 0, 0};
      |                                                                                ^
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp: In function 'void tflite::{anonymous}::EvalQuantizedPerChannel(TfLiteContext*, TfLiteNode*, const TfLiteConvParams&, const NodeData&, const TfLiteEvalTensor*, const TfLiteEvalTensor*, const TfLiteEvalTensor*, TfLiteEvalTensor*)':
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp:1883:58: error: either all initializer clauses should be designated or none of them should be
 1883 |                                 .channels = input_depth, 1
      |                                                          ^
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp:1887:59: error: either all initializer clauses should be designated or none of them should be
 1887 |                                 .channels = output_depth, 1
      |                                                           ^
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp:1889:80: error: either all initializer clauses should be designated or none of them should be
 1889 |     data_dims_t filter_dims = {.width = filter_width, .height = filter_height, 0, 0};
      |                                                                                ^
"C:\\Users\\alist\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\esp-12.2.0_20230208/bin/xtensa-esp32-elf-g++" -MMD -c "@C:\\Users\\alist\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-442a798083/esp32/flags/cpp_flags" -w -Os -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_DEV\"" "-DARDUINO_VARIANT=\"esp32\"" -DARDUINO_PARTITION_huge_app "-DARDUINO_HOST_OS=\"windows\"" "-DARDUINO_FQBN=\"esp32:esp32:esp32cam:CPUFreq=240,FlashFreq=80,FlashMode=qio,PartitionScheme=huge_app,DebugLevel=none,EraseFlash=none\"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -DARDUINO_USB_CDC_ON_BOOT=0 "@C:\\Users\\alist\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-442a798083/esp32/flags/defines" "-IC:\\Users\\alist\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024430-14116-ya6pk7.no2c\\esp32_camera" -iprefix "C:\\Users\\alist\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-442a798083/esp32/include/" "@C:\\Users\\alist\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-442a798083/esp32/flags/includes" "-IC:\\Users\\alist\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-442a798083/esp32/qio_qspi/include" "-IC:\\Users\\alist\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.0\\cores\\esp32" "-IC:\\Users\\alist\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.0\\variants\\esp32" "-Ic:\\Users\\alist\\Documents\\Arduino\\libraries\\Alistair-Fish-Detection_inferencing\\src" "@C:\\Users\\alist\\AppData\\Local\\Temp\\arduino\\sketches\\68EB2289A99F3A7C07951BE1E876EEBE/build_opt.h" "@C:\\Users\\alist\\AppData\\Local\\Temp\\arduino\\sketches\\68EB2289A99F3A7C07951BE1E876EEBE/file_opts" "c:\\Users\\alist\\Documents\\Arduino\\libraries\\Alistair-Fish-Detection_inferencing\\src\\edge-impulse-sdk\\tensorflow\\lite\\micro\\kernels\\dequantize_common.cpp" -o "C:\\Users\\alist\\AppData\\Local\\Temp\\arduino\\sketches\\68EB2289A99F3A7C07951BE1E876EEBE\\libraries\\Alistair-Fish-Detection_inferencing\\edge-impulse-sdk\\tensorflow\\lite\\micro\\kernels\\dequantize_common.cpp.o"
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp: In function 'void tflite::{anonymous}::EvalQuantizedPerChannel(TfLiteContext*, TfLiteNode*, const TfLiteDepthwiseConvParams&, const NodeData&, const TfLiteEvalTensor*, const TfLiteEvalTensor*, const TfLiteEvalTensor*, TfLiteEvalTensor*)':
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp:1727:58: error: either all initializer clauses should be designated or none of them should be
 1727 |                                 .channels = input_depth, 1
      |                                                          ^
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp:1731:59: error: either all initializer clauses should be designated or none of them should be
 1731 |                                 .channels = output_depth, 1
      |                                                           ^
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp:1733:80: error: either all initializer clauses should be designated or none of them should be
 1733 |     data_dims_t filter_dims = {.width = filter_width, .height = filter_height, 0, 0};
      |                                                                                ^
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp: In function 'TfLiteStatus tflite::{anonymous}::Prepare(TfLiteContext*, TfLiteNode*)':
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp:1836:67: error: either all initializer clauses should be designated or none of them should be
 1836 |                                 .channels = input->dims->data[3], 1
      |                                                                   ^
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp:1840:68: error: either all initializer clauses should be designated or none of them should be
 1840 |                                 .channels = output->dims->data[3], 1
      |                                                                    ^
c:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp:1842:80: error: either all initializer clauses should be designated or none of them should be
 1842 |     data_dims_t filter_dims = {.width = filter_width, .height = filter_height, 0, 0};
      |                                                                                ^

Using library Alistair-Fish-Detection_inferencing at version 1.0.1 in folder: C:\Users\alist\Documents\Arduino\libraries\Alistair-Fish-Detection_inferencing 
exit status 1

Context/Use case:

1 Like

Hello @Alistair,

Could you provide more context please?

Best,

Louis

1 Like

Hi, I get this same error as well. When I deploy my impulse as an Arduino project, and try to flash it to my device, the error comes up when compiling. It happens for the static_buffer.ino and esp32_camera.ino present in the downloaded project folder in the Examples folder. My model is a Mobilenetv2 0.05 trained on images of 96x96x3 (rgb) using Transfer Learning for classification. My device is an ESP32S3-WROOM board, which corresponds to the ESP32S3 Dev Kit on the Arduino IDE, and have this selected when I try to flash.

Do you have any idea why this is happening, and what can be done to resolve it? Additionally, is this the main way to run a classifier with an exported Edge Impulse model, or is there another way?

Let me know what you can, and if there’s anything further I can do to help as well!

Thanks,

Sam

Hey everyone, fixed this particular issue by downgrading to ESP32 Arduino Core version 2.0.4.

1 Like