Hi,
While using the Axon TFLite compiler to compile a series of TFLite models, we encountered a peculiar issue.
The largest layer in the models (i.e. the dense layer right after the convolutional part of the network, just after flattening) is consistently doubled in size with respect to its original TFLite model.
Closer inspection reveals that this specific layer indeed has double the number of original weights, but half of them are set to 0 in a consistent [x, x, 0, 0, x, x, 0, 0, ...] pattern (see the compiler output). This effect is persistent across all our 64 tested model sizes from ~4KB to ~1.2MB.
Because we don't see correctness of the model impacted by this, it seems like this is a deliberate action taken by the compiler.
It seems possible to us that this may be done as some kind of internal weight reordering operation in the Axon hardware.
We'd like to know if this doubling is a premeditated action by the compiler and if it can possibly be prevented in some way.
Attached are the compiler logs and the intermediate and final compiler output for the largest model we tried this on, which don't seem to log/warn about anything relevant to this phenomenon.
Our thanks for any information you'd be able to give us about this issue.
Related issue
nrf_axon_model_model_test_uwb_binfile_content_.txt
INFO: running uwb_embedded_test INFO: starting compiler... INFO: model name is : model_test_uwb INFO: test data or proper test labels are not provided, we have the tflite file. INFO: running for variant model_test_uwb INFO: RESHAPE is a PASSTHROUGH Operator INFO: compiler intermediate outputs are saved in : C:\dekimo\vlaio-uwb-edge-ai\test-nrf54-axon_npu\models\uwb_test_model_64/intermediate/ INFO: model compiled successfully .... INFO: not running inference as test vectors are not provided INFO: done running variant model_test_uwb, return code 0 INFO: Performance_Metrics Model_Variant Inference_Time Accuracy Precision Quantization_Loss Flash_Size Ram_Size Total_Memory model_test_uwb None None None None 0 0 0 INFO: completed running uwb_embedded_test, return code 0(NRF_AXON_COMPILER_RESULT_SUCCESS), took 1.80 seconds