2388009_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2388009_en-US

2388009_en-US

Can I use memory config from tflm_label_image_ext_mem for the example tflm_cifar10_cm33_core0?

Have a nice day.

Currently I am using eiq example tflm_cifar10_cm33_core0 to model on NPU mode. Modeldata is saved in SRAM. Inference time is good. And here is memory configuration. I modified this eiq example for my models with 5 classes

nnxxpp_0-1782788058723.png

https://docs.nxp.com/bundle/AN14700/page/topics/eiq_enablement.html


But now my model is larger and I want to locate NPU tflite model on external memory. Modeldata is located in Flash. And here is configuration from eiq example tflm_label_image_ext_mem

nnxxpp_2-1782788224534.png


nnxxpp_1-1782788176608.png

https://docs.nxp.com/bundle/AN14700/page/topics/imx_rt700_system_details.html

My target is that, I want to keep source code from tflm_cifar10_cm33_core0 (I dont want to create new source code with tflm_label_image_ext_mem), but I want to locate my NPU tflite model on external memory. 

My solution that I will change only memory configuration from SRAM to external memory as above images. Is that right? Or I need to change more other configurations.



Re: Can I use memory config from tflm_label_image_ext_mem for the example tflm_cifar10_cm33_core0?

Hi @nnxxpp ,

Thanks for your clarification.

Please do not use `--use-sequencer` together with external-memory model execution.

For the `tflm_label_image_ext_mem` example, please keep `--fetch-constants-to-sram` and remove `--use-sequencer`, since the model is executed from external memory.

Please try converting the model as below:

./neutron-converter \
--input QAT.tflite \
--output QAT_NPU.tflite \
--target imxrt700 \
--dump-header-file-output \
--dump-header-file-input \
--fetch-constants-to-sram
 

mayliu1_0-1782872651573.pngmayliu1_1-1782872691770.png

Wish it helps you

Best Regards

May

Re: Can I use memory config from tflm_label_image_ext_mem for the example tflm_cifar10_cm33_core0?

@mayliu1 
Hi. This is new issue (not resolved yet). This issue is related to deploy NPU tflite model on external memory (not on SRAM).

Currently, I am using eiq sample tflm_label_image_ext_mem from SDK of MIMRT700. I could successfully run this example. This example is for model mobilenetv1, size=224 and number of classes=1000.

I tried to replace the sample's model by my model (same classification model) but with different number of classes.

  • I have changed labels.h (for label names), 
  • I replaced the sample's model by my model and I keep the same name
  • I also change model_data_len in the file model_data.h

I could build, but when running debug, the program is stopping at "Static processing" and did not give result.

nnxxpp_0-1782812429613.png

There is an message in the above image Unable to save model handle, call neutronModelUnprepare() when done but one NXP's employee said that it is not error. https://community.nxp.com/t5/eIQ-Machine-Learning-Software/eIQ-FAQ/ta-p/1099741

I see that in the case NPU model is located on external memory, we use model with extension .tflite (not header file .h in the case we locate model on SRAM).

I convert model with flag --fetch-constants-to-sram to locate NPU model on external memory like this

./neutron-converter \
--input QAT.tflite \
--output QAT_NPU.tflite \
--target imxrt700 \
--dump-header-file-output \
--dump-header-file-input \
--use-sequencer \
--fetch-constants-to-sram
 

Because I did not see any tutorial from NXP to set up and configs (where and how to change source code), so I tried with the above steps, but it did not work.

Could you help me? Thank you.

Re: Can I use memory config from tflm_label_image_ext_mem for the example tflm_cifar10_cm33_core0?

Hi @nnxxpp ,

Thank you so much for your interest in our products and for using our community.

I apologize for the delayed response.

I noticed that in your previous post, you mentioned that the issue has already been resolved. I’m glad to hear that everything is working now.

Thank you again for your understanding.

Best regards,

May

タグ(1)
評価なし
バージョン履歴
最終更新日:
昨日
更新者: