<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MCX MicrocontrollersのトピックRe: MCXN947 : Failed initializing model</title>
    <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1982639#M1839</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/120734"&gt;@eric_langner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. You can try to run the Label the CIFAR10 images from the camera on FRDM-MCXN947 on your board.&amp;nbsp;If you can successfully run, it proves that there is a problem with the trained model or the replacement model.&lt;/P&gt;
&lt;P&gt;2. “&lt;SPAN&gt;After debugging it turns out that I my program is stuck in a endless loop after the function Model_Init() does not return with status "success". In other words, the init of the model failed.&amp;nbsp;&lt;/SPAN&gt;”&lt;/P&gt;
&lt;P&gt;May I ask which part of this function is stuck?&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Hang&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2024 03:56:21 GMT</pubDate>
    <dc:creator>Harry_Zhang</dc:creator>
    <dc:date>2024-10-28T03:56:21Z</dc:date>
    <item>
      <title>MCXN947 : Failed initializing model</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1981894#M1827</link>
      <description>&lt;P&gt;Hej,&lt;/P&gt;&lt;P&gt;I am using the FRDM-MCXN947 with a LC-display and a &lt;SPAN&gt;OV7670 camera. I&amp;nbsp;&lt;/SPAN&gt;want to train and run a model based on my own training data on that setup. After that, I want to do some performance measurements. This is the goal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found a good article to archive that goal and I followed this article [1] but unfortunately my model does not run and I do not know why.&amp;nbsp;&lt;/P&gt;&lt;P&gt;eIQ : I was able to import my dataset, after that I choosed a base model (ssd_mobilenet_v3) and started to train my model. The validation was successful but the accuracy (18%) was much lower than expected. I know that the accuracy could be improved but I want to go through the toolchain at first. Finally, I exported the model to *.tflite and as Neutron target.&amp;nbsp;&lt;/P&gt;&lt;P&gt;MUXpressoIDE : I was able to import the converted model in my cifar10-project from the Application Hub, build and run the project and it did not worked. After debugging it turns out that I my program is stuck in a endless loop after the function Model_Init() does not return with status "success". In other words, the init of the model failed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So here I am&amp;nbsp;and I don't know how to narrow down or best-case fix the error.&lt;/P&gt;&lt;P&gt;Can you help me ?&lt;/P&gt;&lt;P&gt;eIQ Toolkit version 1.11&lt;/P&gt;&lt;P&gt;eIQ Portal 2.11.2&lt;/P&gt;&lt;P&gt;MUXpressoIDE v11.9.1&lt;/P&gt;&lt;P&gt;[1]&amp;nbsp;&lt;A href="https://community.nxp.com/t5/MCX-Microcontrollers-Knowledge/MCXN947-How-to-Train-and-Deploy-Customer-ML-model-to-NPU/ta-p/1899497" target="_blank"&gt;https://community.nxp.com/t5/MCX-Microcontrollers-Knowledge/MCXN947-How-to-Train-and-Deploy-Customer-ML-model-to-NPU/ta-p/1899497&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 08:59:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1981894#M1827</guid>
      <dc:creator>eric_langner</dc:creator>
      <dc:date>2024-10-25T08:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: MCXN947 : Failed initializing model</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1981994#M1828</link>
      <description>&lt;P&gt;It is not the Neutron converter which I found in "eIQ" &amp;gt; "Settings" because I compared different version [1][2][3] and the error is still the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1] Neutron converter in MCUXpresso SDK 2.15.003&lt;/P&gt;&lt;P&gt;[2] Neutron converter in MCUXpresso SDK 2.14.0&lt;/P&gt;&lt;P&gt;[3] Neutron converter in MCUXpresso SDK 2.13.1&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 11:22:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1981994#M1828</guid>
      <dc:creator>eric_langner</dc:creator>
      <dc:date>2024-10-25T11:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: MCXN947 : Failed initializing model</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1982067#M1829</link>
      <description>&lt;P&gt;I take a step back and removed my project from MCUXpresso IDE. After that, I downloaded the&amp;nbsp;&lt;SPAN&gt;Label CIFAR10 Image project from the Application Code Hub. This project works fine ! Then I replaced the model, adjusted the path of the model and and adjusted the labels in labels.h. I still have the error in&amp;nbsp;Model_Init() but the console output the following error.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Didn't find op for builtin opcode 'MUL'&lt;BR /&gt;Failed to get registration from op code MUL&lt;/P&gt;&lt;P&gt;AllocateTensors() failedFailed initializing model&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 13:32:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1982067#M1829</guid>
      <dc:creator>eric_langner</dc:creator>
      <dc:date>2024-10-25T13:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: MCXN947 : Failed initializing model</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1982639#M1839</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/120734"&gt;@eric_langner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. You can try to run the Label the CIFAR10 images from the camera on FRDM-MCXN947 on your board.&amp;nbsp;If you can successfully run, it proves that there is a problem with the trained model or the replacement model.&lt;/P&gt;
&lt;P&gt;2. “&lt;SPAN&gt;After debugging it turns out that I my program is stuck in a endless loop after the function Model_Init() does not return with status "success". In other words, the init of the model failed.&amp;nbsp;&lt;/SPAN&gt;”&lt;/P&gt;
&lt;P&gt;May I ask which part of this function is stuck?&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Hang&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 03:56:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1982639#M1839</guid>
      <dc:creator>Harry_Zhang</dc:creator>
      <dc:date>2024-10-28T03:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: MCXN947 : Failed initializing model</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1982826#M1846</link>
      <description>&lt;P&gt;Hej,&lt;/P&gt;&lt;P&gt;I fully agree with your suggested first step to check if the CIFAR10 project can run successfully. I did this and the example project from the NXP Application Code Hub can run successfully.&amp;nbsp;So, regarding the NXP tutorial [1] this is step 7. This step 7 is fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the step before in the tutorial is step 6 "Convert to TensorFlow Lite for Neutron (.tflite)". How to check if this step run successfully ?&lt;/P&gt;&lt;P&gt;Well, luckily within the&amp;nbsp;CIFAR10 project two models [2][3] are included. One is the created, the other one ie the converted. Based on the created model, I converted the model again to verify if the eIQ converter works. To my surprise, I get different results.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So it looks like the is a bug in some version of the Neutron converter. Do you agree ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the steps to verify:&lt;/P&gt;&lt;P&gt;1) Download the&amp;nbsp;CIFAR10 project from NXP Application Hub. The are two models included. One is the created model [2]. The other one [3] is the converted model (converted with the Neutron converter).&lt;/P&gt;&lt;P&gt;2) In eIQ, open "Model tool" and "Open Model" and open the converted model [2]. This is my reference to which I compare everything.&lt;/P&gt;&lt;P&gt;3) In eIQ, open "Settings" and set the Neutron converter version to "MCUXpresso SDK 2.15.003". Close "Settings" and open "Model tool" and "Open model" and open the unconverted model [2]. Now in the menu, open "Convert" and "TensofFlow Lite for Neutron (*.tflite)" and choose the Neutron target "mcxn94x" and press the button "Convert" and save the converted model somewhere. This step is fine now.&amp;nbsp;Now eIQ, open "Model tool" and "Open Model" and open the your converted model and compare it with the one from [1]. You hopefully realise a difference to the model from NXP in step 2)&lt;/P&gt;&lt;P&gt;4) In eIQ, open "Settings" and set the Neutron converter version to "MCUXpresso SDK 2.14.0". Close "Settings" and open "Model tool" and "Open model" and open the unconverted model [2]. Now in the menu, open "Convert" and "TensofFlow Lite for Neutron (*.tflite)" and choose the Neutron target "mcxn94x" and press the button "Convert" and save the converted model somewhere. This step is fine now.&amp;nbsp;Now eIQ, open "Model tool" and "Open Model" and open the your converted model and compare it with the one from [1]. You hopefully realise no difference to the model from NXP in step 2)&lt;/P&gt;&lt;P&gt;5) In eIQ, open "Settings" and set the Neutron converter version to "MCUXpresso SDK 2.13.1". Close "Settings" and open "Model tool" and "Open model" and open the unconverted model [2]. Now in the menu, open "Convert" and "TensofFlow Lite for Neutron (*.tflite)" and choose the Neutron target "mcxn94x" and press the button "Convert" and save the converted model somewhere. This step is fine now.&amp;nbsp;Now eIQ, open "Model tool" and "Open Model" and open the your converted model and compare it with the one from [1]. You hopefully realise no difference to the model from NXP in step 2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1]&amp;nbsp;&lt;A href="https://community.nxp.com/t5/MCX-Microcontrollers-Knowledge/MCXN947-How-to-Train-and-Deploy-Customer-ML-model-to-NPU/ta-p/1899497" target="_blank"&gt;https://community.nxp.com/t5/MCX-Microcontrollers-Knowledge/MCXN947-How-to-Train-and-Deploy-Customer-ML-model-to-NPU/ta-p/1899497&lt;/A&gt;&lt;/P&gt;&lt;P&gt;[2]&amp;nbsp;mobilenet_v1_0.25-cifar10_128_128.tflite&lt;/P&gt;&lt;P&gt;[3]&amp;nbsp;mobilenet_v1_0.25-cifar10_128_128_converted.tflite&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 08:59:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1982826#M1846</guid>
      <dc:creator>eric_langner</dc:creator>
      <dc:date>2024-10-28T08:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: MCXN947 : Failed initializing model</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1984542#M1862</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/120734"&gt;@eric_langner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The appropriate SDK version should be selected when convert the model.&lt;/P&gt;
&lt;P&gt;For example.&lt;/P&gt;
&lt;P&gt;when you import the&amp;nbsp;Label CIFAR10 image on FRDM-MCXN947 from NXP Application Code Hub.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HangZhang_0-1730274862501.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307653i7357545000472C4E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HangZhang_0-1730274862501.png" alt="HangZhang_0-1730274862501.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can see, the version of SDK is 2.14.&lt;/P&gt;
&lt;P&gt;And i open the&amp;nbsp;mobilenet_v1_0.25-cifar10_128_128_converted.tflite,&lt;/P&gt;
&lt;P&gt;And i try to convert the&amp;nbsp;mobilenet_v1_0.25-cifar10_128_128.tflite to&amp;nbsp;mobilenet_v1_0.25-cifar10_128_128_converted2.14.tflite in SDK VERSION2.14.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HangZhang_2-1730275084671.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307655iCEBDFF7A4C46BE0B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HangZhang_2-1730275084671.png" alt="HangZhang_2-1730275084671.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;They are the same.&lt;/P&gt;
&lt;P&gt;But when you try to&amp;nbsp;convert the&amp;nbsp;mobilenet_v1_0.25-cifar10_128_128.tflite to&amp;nbsp;mobilenet_v1_0.25-cifar10_128_128_converted2.14.tflite in SDK VERSION2.16.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HangZhang_3-1730275532666.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307657iE45B279DD2FBA97F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HangZhang_3-1730275532666.png" alt="HangZhang_3-1730275532666.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;They are different, and when you try to replace the model, the runtime will report an error.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HangZhang_4-1730275916142.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307658i5C333B095D967EED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HangZhang_4-1730275916142.png" alt="HangZhang_4-1730275916142.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope this will help you.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Hang&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 08:12:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1984542#M1862</guid>
      <dc:creator>Harry_Zhang</dc:creator>
      <dc:date>2024-10-30T08:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: MCXN947 : Failed initializing model</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1994636#M1986</link>
      <description>&lt;P&gt;"The appropriate SDK version should be selected when convert the model."&lt;/P&gt;&lt;P&gt;Okay, I did not know that. and will take this into account in the future. Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try to narrow down the problem further.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 12:35:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-Failed-initializing-model/m-p/1994636#M1986</guid>
      <dc:creator>eric_langner</dc:creator>
      <dc:date>2024-11-14T12:35:28Z</dc:date>
    </item>
  </channel>
</rss>

