<?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>topic Re: Tensorflow to CMSIS-NN via Glow in eIQ Machine Learning Software</title>
    <link>https://community.nxp.com/t5/eIQ-Machine-Learning-Software/Tensorflow-to-CMSIS-NN-via-Glow/m-p/1199784#M337</link>
    <description>&lt;P&gt;&lt;SPAN&gt;To summarize what we discussed via messenger, Glow does not convert a model into CMSIS-NN code. Instead it compiles a model into a machine executable binary, and as part of that process the compiler has the option, if specified with the -use-cmsis argument, to make use of the CMSIS-NN libraries to speed up the execution of that code. The end result of running the Glow compiler though is a binary file that gets executed as part of a MCUXpresso SDK project.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If the model is not doing image classification, the Glow &lt;A href="https://github.com/pytorch/glow/blob/master/docs/AOT.md" target="_self"&gt;model-profiler tool (look under the "Compile a bundle for a quantized model" section)&lt;/A&gt;&amp;nbsp; can be used to generate a quantization profile. This tool is not included in the current NXP Glow release, but will be part of the next NXP Glow release early next year.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I should note that there are scripts (code_gen.py) from ARM that can &lt;A href="https://github.com/ARM-software/ML-examples/tree/master/cmsisnn-cifar10" target="_self"&gt;convert a Caffe model into CMSIS-NN API calls&lt;/A&gt;.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Finally it may be possible to run your model using Glow on a LPC53S57 chip. There's a &lt;A href="https://community.nxp.com/t5/eIQ-Machine-Learning-Software/eIQ-Glow-Porting-Guide-for-MCUs/ta-p/1134663" target="_self"&gt;Glow porting guide&lt;/A&gt; available that should help with the porting process. The key requirement will be how large your model is which determines if it'll fit in the memory constraints of that device.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Dec 2020 16:51:20 GMT</pubDate>
    <dc:creator>anthony_huereca</dc:creator>
    <dc:date>2020-12-15T16:51:20Z</dc:date>
    <item>
      <title>Tensorflow to CMSIS-NN via Glow</title>
      <link>https://community.nxp.com/t5/eIQ-Machine-Learning-Software/Tensorflow-to-CMSIS-NN-via-Glow/m-p/1196300#M330</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I need to convert a tensorflow-model so that it will run on a LPC43S57-Chip using CMSIS-NN.&lt;/P&gt;&lt;P&gt;What I have so far:&lt;/P&gt;&lt;P&gt;Created a small, simple network using Python 3.7.9, Keras 2.4.3 and coverted it to onnx using onnxmltools 1.7.0.&lt;/P&gt;&lt;P&gt;I downloaded the &lt;A href="https://www.nxp.com/design/software/development-software/eiq-ml-development-environment/eiq-for-glow-neural-network-compiler:eIQ-Glow?tab=Design_Tools_Tab" target="_blank" rel="noopener"&gt;"Glow Installer for windows"&lt;/A&gt; from your website, installed it and ran the model-compiler command to received the folder as the output as expected.&lt;/P&gt;&lt;P&gt;I have two questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;In &lt;A href="https://www.nxp.com/design/training/getting-started-with-eiq-ml-software-for-glow-neural-network-compiler:TIP-GETTING-STARTED-WITH-EIQ-ML-SOFTWARE-FOR-GLOW" target="_blank" rel="noopener"&gt;this&lt;/A&gt; video you mention a quantization-profile and use the "image-classifier" command. What command is to use if the input to the model is NOT a picture?&lt;/LI&gt;&lt;LI&gt;As stated, I need to use the CMSIS-NN library. The functions of the CMSIS-NN-library expect arrays for the different layers for their weightes and biases. The output of model-compiler (glow) seems to store the weights and bias information inside the "xxx.weights.txt" file but they are not organized so that they can be used with CMSIS-NN. How do you organize the values inside "xxx.weights.txt" so that they can be used with CMSIS-NN?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Best&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 10:38:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/eIQ-Machine-Learning-Software/Tensorflow-to-CMSIS-NN-via-Glow/m-p/1196300#M330</guid>
      <dc:creator>jack5</dc:creator>
      <dc:date>2020-12-09T10:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Tensorflow to CMSIS-NN via Glow</title>
      <link>https://community.nxp.com/t5/eIQ-Machine-Learning-Software/Tensorflow-to-CMSIS-NN-via-Glow/m-p/1199784#M337</link>
      <description>&lt;P&gt;&lt;SPAN&gt;To summarize what we discussed via messenger, Glow does not convert a model into CMSIS-NN code. Instead it compiles a model into a machine executable binary, and as part of that process the compiler has the option, if specified with the -use-cmsis argument, to make use of the CMSIS-NN libraries to speed up the execution of that code. The end result of running the Glow compiler though is a binary file that gets executed as part of a MCUXpresso SDK project.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If the model is not doing image classification, the Glow &lt;A href="https://github.com/pytorch/glow/blob/master/docs/AOT.md" target="_self"&gt;model-profiler tool (look under the "Compile a bundle for a quantized model" section)&lt;/A&gt;&amp;nbsp; can be used to generate a quantization profile. This tool is not included in the current NXP Glow release, but will be part of the next NXP Glow release early next year.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I should note that there are scripts (code_gen.py) from ARM that can &lt;A href="https://github.com/ARM-software/ML-examples/tree/master/cmsisnn-cifar10" target="_self"&gt;convert a Caffe model into CMSIS-NN API calls&lt;/A&gt;.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Finally it may be possible to run your model using Glow on a LPC53S57 chip. There's a &lt;A href="https://community.nxp.com/t5/eIQ-Machine-Learning-Software/eIQ-Glow-Porting-Guide-for-MCUs/ta-p/1134663" target="_self"&gt;Glow porting guide&lt;/A&gt; available that should help with the porting process. The key requirement will be how large your model is which determines if it'll fit in the memory constraints of that device.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 16:51:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/eIQ-Machine-Learning-Software/Tensorflow-to-CMSIS-NN-via-Glow/m-p/1199784#M337</guid>
      <dc:creator>anthony_huereca</dc:creator>
      <dc:date>2020-12-15T16:51:20Z</dc:date>
    </item>
  </channel>
</rss>

