{"id":188,"date":"2020-04-27T13:37:53","date_gmt":"2020-04-27T13:37:53","guid":{"rendered":"http:\/\/mike-netz.biz\/?p=188"},"modified":"2025-10-26T17:44:11","modified_gmt":"2025-10-26T17:44:11","slug":"deep-neuronal-network-auf-einen-cortex-m7-von-st-ausfuehren","status":"publish","type":"post","link":"https:\/\/mike-netz.biz\/?p=188","title":{"rendered":"Ein Deep Neural Network auf einem Cortex-M7-Mikrocontroller von ST ausf\u00fchren"},"content":{"rendered":"<p>Mit dem Erweiterungspaket STM32Cube.AI erm\u00f6glicht STMicroelectronics ein Neuronales Netz auf einen Mikrocontroller auszuf\u00fchren. In dem folgenden Beispiel LED-Monitoring wird ein DNN (Deep Neuronal Network) mit Keras\/Tensorflow erstellt, dann mittels&nbsp;STM32Cube.AI in das C-Projekt importiert und anschlie\u00dfend auf dem Testboard&nbsp; Nucleo-F767ZI ausgef\u00fchrt.<\/p>\n<p>Das Beispiel veranschaulicht die Machbarkeit und Vorgehensweise.<\/p>\n<p>Quellcode:&nbsp;<a href=\"https:\/\/github.com\/embmike\/State-Monitoring-With-AI\">https:\/\/github.com\/embmike\/State-Monitoring-With-AI<\/a><\/p>\n<p><strong>Aufgabe<\/strong><\/p>\n<p>Mittels der Schalttabelle<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mike-netz.biz\/wp-content\/uploads\/2021\/03\/0024_Schalttabelle.png\" alt=\"Schalttabelle\" width=\"509\" height=\"129\"><\/p>\n<p>werden User-LED1 Gr\u00fcn auf Pin PB0 und User-LED3 Rot auf Pin PB14 auf dem Board Nucleo-F767ZI angesteuert.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mike-netz.biz\/wp-content\/uploads\/2021\/03\/0026_\u00dcbersicht_Nucleo-F767ZI.png\" alt=\"Nucleo-F767Z\" width=\"633\" height=\"784\"><\/p>\n<p><b>Werkzeuge<\/b><\/p>\n<ul>\n<li><strong>Keras<\/strong>: Open Deep-Learning -Bibliothek f\u00fcr Python<\/li>\n<li><strong>Tensorflow<\/strong>: Open Source Bibliothek zum Training und Entwicklung von Modellen des maschinellen Lernens (Machine Learning)<\/li>\n<li><strong>Spyder IDE<\/strong>: Scientific Python Development Environment<\/li>\n<li><strong>STM32CubeIDE:<\/strong> Die Software-Entwicklungsumgebung von ST f\u00fcr Mikrocontroller und Mikroprozessoren wie STM32F767<\/li>\n<li><strong>Nucleo-F767ZI:<\/strong> Entwicklungsboard von ST<\/li>\n<li><strong>Hercules SETUP utility<\/strong>: Serial Port Terminal<\/li>\n<\/ul>\n<p><b>Auflauf<\/b><\/p>\n<ol>\n<li>Entwicklung des DNN in der Spyder IDE mit den Bibliotheken Keras\/Tensorflow<\/li>\n<li>Training und Validierung des DNN<\/li>\n<li>DNN als h5-Datei speichern<\/li>\n<li>C-Projekt in der STM32CubeIDE anlegen<\/li>\n<li>DNN-h5-Datei importieren und validieren<\/li>\n<li>Die DNN-C-Funktion implementieren<\/li>\n<li>DNN-C-Funktion ausf\u00fchren und pr\u00fcfen<\/li>\n<\/ol>\n<p><b>Entwicklung des DNN in der Spyder IDE mit den Bibliotheken Keras\/Tensorflow<\/b><\/p>\n<p>Mittels&nbsp;<span style=\"font-family: 'courier new', courier, monospace;\">led_monitoring = Sequential()<\/span> wird ein DNN angelegt. Es besteht aus :<\/p>\n<ul>\n<li>einer vollst\u00e4ndig verbundenen Eingangsschicht mit 48 Neuronen und jeweils mit einer Rectifier-Aktivierungsfunktion (ReLU)&nbsp;<img decoding=\"async\" title=\"{\\displaystyle f(x)=\\max(0,x)}\" src=\"http:\/\/latex.codecogs.com\/gif.latex?{\\displaystyle&amp;space;f(x)=\\max(0,x)}\"><\/li>\n<li>einer vollst\u00e4ndig verbundenen Ausgangsschicht mit 3 Neuronen und mit einer Softmax-Aktivierungsfunktion <img decoding=\"async\" title=\"P\\left ( y=j \\, | \\, x \\right ) = \\frac{e^{x^{T_{w_{j}}}}}{\\sum _{k=1}^{K}e^{x^{T_{w_{k}}}}}\" src=\"http:\/\/latex.codecogs.com\/gif.latex?P\\left&amp;space;(&amp;space;y=j&amp;space;\\,&amp;space;|&amp;space;\\,&amp;space;x&amp;space;\\right&amp;space;)&amp;space;=&amp;space;\\frac{e^{x^{T_{w_{j}}}}}{\\sum&amp;space;_{k=1}^{K}e^{x^{T_{w_{k}}}}}\"><\/li>\n<\/ul>\n<pre class=\"width-set:true width:750 lang:python decode:true \">#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\n@author: Mike Netz\n\"\"\"\n# Import Numpy and Keras utilities\nimport numpy as np\nfrom keras import utils\nfrom keras.models import Sequential\nfrom keras.layers.core import Dense, Activation\nfrom keras.utils import plot_model\n\nimport matplotlib.pyplot as plt\n\n\n# Set random seed\nnp.random.seed(42)\n\n# Our data\n# LED State\n#\n# UC x1 x2 y\n# 1  0  0  2 &gt; FAILURE &gt; RED LED ON\n# 2  0  1  0 &gt; OFF     &gt; ALL LEDs OFF\n# 3  1  0  1 &gt; ON      &gt; GREEN LED ON\n# 4  1  1  2 &gt; FAILURE &gt; RED LED ON\n#'\nX = np.array([[0,0],[0,1],[1,0],[1,1]]).astype('float32')\ny = np.array([[2],[0],[1],[2]]).astype('float32')\n\n\n# One-hot encoding the output\ny = utils.to_categorical(y)\n\n# Building the model\nled_monitoring = Sequential()\n\n# Add required layers\nled_monitoring.add(Dense(48, input_dim=X.shape[1]))\nled_monitoring.add(Activation(\"relu\"))\nled_monitoring.add(Dense(3))\nled_monitoring.add(Activation(\"softmax\"))\n\n# Specify loss as \"binary_crossentropy\", optimizer as \"adam\",\n# and add the accuracy metric0led_monitoring.compile(loss=\"categorical_crossentropy\", \n# optimizer=\"adam\", metrics = [\"accuracy\"])\nled_monitoring.compile(loss=\"categorical_crossentropy\",optimizer=\"adam\",metrics=[\"accuracy\"])\n\n# Uncomment this line to print the model architecture\nled_monitoring.summary()\n\n<\/pre>\n<p>Deep Neural Network: <span style=\"font-family: 'courier new', courier, monospace;\">led_monitoring<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mike-netz.biz\/wp-content\/uploads\/2021\/03\/0015_led_monitoring_dnn.png\" alt=\"Deep Neural Network\" width=\"511\" height=\"212\"><\/p>\n<p><b>Training und Validierung des DNN<\/b><\/p>\n<p>Da das DNN ein einfaches Schaltwerk mit wenigen aber vollst\u00e4ndigen Anwendungsf\u00e4llen ist, ist eine Aufteilung zwischen Trainings- und Testset nicht notwendig.<\/p>\n<pre class=\"lang:python decode:true \"># Fitting the model\nhistory = led_monitoring.fit(X, y, epochs=100, verbose=1)\n#print('\\nhistory dict:', history.history)\n\n# plot model\nplot_model(led_monitoring, to_file='led_monitoring_model.png')\n\n# Scoring the model\nscore = led_monitoring.evaluate(X, y)\nprint(\"\\nAccuracy: \", score[-1])\n\n# Checking the predictions\nprint(\"\\nPredictions:\")\nprint(led_monitoring.predict_proba(X))\n\n# Plot training &amp; validation accuracy values\ndef ploti():\n    plt.plot(history.history['accuracy'])\n    plt.plot(history.history['loss'])\n    plt.title('Model accuracy')\n    plt.ylabel('Accuracy')\n    plt.xlabel('Epoch')\n    plt.legend(['Accuracy', 'Loss'], loc='upper left')\n    plt.savefig('led_monitoring_plot.png', dpi=300)\n    plt.show()\n    \nploti()<\/pre>\n<p>Bereits nach 38 Trainingsepochen wird eine Modellgenauigkeit von 100% erzielt.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/mike-netz.biz\/wp-content\/uploads\/2021\/03\/0016_led_monitoring_plot.png\" alt=\"Modellgenauigkeit des DNN\" width=\"553\" height=\"369\"><\/p>\n<p>Ausgabeschicht mit den 3 Wahrscheinlichkeiten der Klassifikationen <img decoding=\"async\" title=\"[p(0), p(1), p(2)]\" src=\"http:\/\/latex.codecogs.com\/gif.latex?[p(0),&amp;space;p(1),&amp;space;p(2)]\">&nbsp;je Eingangsvektor der Schalttabelle.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/mike-netz.biz\/wp-content\/uploads\/2021\/03\/0001_accuracy.png\" alt=\"Modellgenauigkeit\" width=\"314\" height=\"136\"><\/p>\n<p><b>DNN als h5-Datei speichern<\/b><\/p>\n<pre class=\"lang:python decode:true \"># Save Model for STM32Cube.AI import\nled_monitoring.save('led_monitoring.h5')<\/pre>\n<p><b>C-Projekt in der STM32CubeIDE anlegen<\/b><\/p>\n<p>STM32CubeIDE starten und <span style=\"font-family: 'courier new', courier, monospace;\">File &gt; New &gt; STM32 Project<\/span> ausw\u00e4hlen. Im <span style=\"font-family: 'courier new', courier, monospace;\">Board Selector<\/span> das Board <span style=\"font-family: 'courier new', courier, monospace;\">Nucleo-F767ZI<\/span> ausw\u00e4hlen und <span style=\"font-family: 'courier new', courier, monospace;\">Next<\/span> klicken.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mike-netz.biz\/wp-content\/uploads\/2021\/03\/0005_Board-Selector.png\" alt=\"Board Selector\" width=\"1461\" height=\"1034\"><\/p>\n<p><span style=\"font-family: 'courier new', courier, monospace;\">LED_Monitoring<\/span> als Projektname angeben und <span style=\"font-family: 'courier new', courier, monospace;\">Finish<\/span> klicken.<\/p>\n<p><b>DNN-h5-Datei importieren, validieren und Quellcode&nbsp;<\/b><b>generieren<\/b><\/p>\n<p>Datei <span style=\"font-family: 'courier new', courier, monospace;\">LED_Monitoring.ioc<\/span> \u00f6ffnen. Auf das Tab <span style=\"font-family: 'courier new', courier, monospace;\">Additional Software<\/span> klicken. Im Fenster <span style=\"font-family: 'courier new', courier, monospace;\">Additional Software Components selection<\/span> die Checkbox <span style=\"font-family: 'courier new', courier, monospace;\">Artificial Intelligence<\/span> ausw\u00e4hlen. Unter Packs <span style=\"font-family: 'courier new', courier, monospace;\">Core<\/span> und <span style=\"font-family: 'courier new', courier, monospace;\">Application Templates<\/span> ausw\u00e4hlen. Anschlie\u00dfend auf <span style=\"font-family: 'courier new', courier, monospace;\">Ok<\/span> klicken.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mike-netz.biz\/wp-content\/uploads\/2021\/03\/0002_Additional-Software-Components-selection.png\" alt=\"STM32CubeMX.AI\" width=\"1315\" height=\"726\"><\/p>\n<p>Im Tab <span style=\"font-family: 'courier new', courier, monospace;\">Categories<span style=\"font-family: georgia, palatino, serif;\">, unter<\/span> Additional Software<span style=\"font-family: georgia, palatino, serif;\"> den Men\u00fcpunkt&nbsp;<\/span>STMicroelectronics X-CUBE-AI<\/span> anklicken.&nbsp; In Fenster <span style=\"font-family: 'courier new', courier, monospace;\">Artificial Intelligence X-CUBE-AI<\/span> und&nbsp;<span style=\"font-family: 'courier new', courier, monospace;\">Artificial Intelligence Application<\/span> ausw\u00e4hlen. Im Fenster <span style=\"font-family: 'courier new', courier, monospace;\">Configuration<\/span> auf <span style=\"font-family: 'courier new', courier, monospace;\">Add network<\/span> klicken. Im Bereich <span style=\"font-family: 'courier new', courier, monospace;\">Model inputs<\/span> als Name<span style=\"font-family: 'courier new', courier, monospace;\"> led_monitoring_network<\/span> eintragen. Darunter links <span style=\"font-family: 'courier new', courier, monospace;\">Keras<\/span> und rechts <span style=\"font-family: 'courier new', courier, monospace;\">Saved model<\/span> ausw\u00e4hlen. Darunter bei <span style=\"font-family: 'courier new', courier, monospace;\">Model:<\/span> nach dem Netzwerk <span style=\"font-family: 'courier new', courier, monospace;\">led_monitoring.h5<\/span> browsen. Das Netzwerk ist nun importiert.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mike-netz.biz\/wp-content\/uploads\/2021\/03\/0013_LED_Moniroring_ioc.png\" alt=\"Keras model\" width=\"1448\" height=\"920\"><\/p>\n<p>Nun muss \u00fcberpr\u00fcft werden, ob die Speicher f\u00fcr das Netzwerk ausreichen oder es komprimiert werden muss. Nun auf <span style=\"font-family: 'courier new', courier, monospace;\">Analyze<\/span> klicken. Passt das Netzwerk in die Speicher erscheint bei <span style=\"font-family: 'courier new', courier, monospace;\">Analyze<\/span> ein gr\u00fcner Haken.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mike-netz.biz\/wp-content\/uploads\/2021\/03\/0003_Analyze.png\" alt=\"Gr\u00fcner Haken\" width=\"173\" height=\"49\"><\/p>\n<p>Nun auf <span style=\"font-family: 'courier new', courier, monospace;\">Save all<\/span> oben in der Men\u00fcleiste klicken. <span style=\"font-family: 'courier new', courier, monospace;\">STM32CubeMX<\/span> generiert den Initialcode.<\/p>\n<p><b>Die DNN-C-Funktion implementieren<\/b><\/p>\n<p>Die Datei <span style=\"font-family: 'courier new', courier, monospace;\">main.c<\/span> im Order <span style=\"font-family: 'courier new', courier, monospace;\">LED_Monitoring &gt; Core &gt; Src<\/span> \u00f6ffnen. Die DNN-Funktion <span style=\"font-family: 'courier new', courier, monospace;\">MX_X_CUBE_AI_Process()<\/span> wird zyklisch in der <span style=\"font-family: 'courier new', courier, monospace;\">while<\/span>&nbsp;der <span style=\"font-family: 'courier new', courier, monospace;\">main()<\/span> aufgerufen.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mike-netz.biz\/wp-content\/uploads\/2021\/03\/0018_main-funktion.png\" alt=\"main.c\" width=\"1030\" height=\"876\"><\/p>\n<p>Die DNN-Funktion&nbsp;<span style=\"font-family: 'courier new', courier, monospace;\">MX_X_CUBE_AI_Process()<\/span> befindet sich in der Quellcode-Datei&nbsp;<span style=\"font-family: 'courier new', courier, monospace;\">LED_Monitoring &gt; X-CUBE-AI &gt; App &gt; app_x-cube-ai.c<\/span>. Mit jedem der 4 Use cases wird das DNN mit der Funktion&nbsp;<span style=\"font-family: 'courier new', courier, monospace;\"><span class=\"crayon-e\">aiRun<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">in_data<\/span><span class=\"crayon-sy\">,<\/span> <span class=\"crayon-v\">out_data<\/span><\/span><span class=\"crayon-sy\"><span style=\"font-family: 'courier new', courier, monospace;\">)&nbsp;<span style=\"font-family: georgia, palatino, serif;\">aufgerufen<\/span><\/span><span style=\"font-family: georgia, palatino, serif;\">. <\/span><\/span><\/p>\n<p><span class=\"crayon-sy\">Der Parameter <span style=\"font-family: 'courier new', courier, monospace;\">in_data<\/span> ist der jeweilige Eingabe-Vektor, wie&nbsp;<\/span><\/p>\n<p><span class=\"crayon-sy\" style=\"font-family: 'courier new', courier, monospace;\">((ai_float *)in_data)[0] = (ai_float) 0.0f; <\/span><\/p>\n<p><span class=\"crayon-sy\" style=\"font-family: 'courier new', courier, monospace;\">((ai_float *)in_data)[1] = (ai_float) 0.0f;<\/span><\/p>\n<p>Der Parameter <span style=\"font-family: 'courier new', courier, monospace;\">out_data<\/span> beinhaltet die 3 Werte (p(0), p(1), p(2)) der Ausgangsschicht. Die 3 Werte geben die jeweilige Wahrscheinlichkeit der Klassifikation wieder. Der gr\u00f6\u00dfte Wahrscheinlichkeit ist Klassifikation zum Eingangsvektor.<\/p>\n<p>Mit jedem Use case werden die<span style=\"font-family: 'courier new', courier, monospace;\"> User-LEDs<\/span> entsprechend angesteuert sowie Debugausgaben mittels <span style=\"font-family: 'courier new', courier, monospace;\">prinf &gt; Uart3 &gt;&nbsp;Serial Port Terminal<\/span> ausgegeben.<\/p>\n<pre class=\"width-set:true width:750 lang:c decode:true \">void MX_X_CUBE_AI_Process(void)\n{\n    \/* USER CODE BEGIN 1 *\/\n\t\/* Example of definition of the buffers to store the tensor input\/output *\/\n\t\/*  type is dependent of the expected format                             *\/\n\tAI_ALIGNED(4)\n\tstatic ai_i8 in_data[AI_LED_MONITORING_NETWORK_IN_1_SIZE_BYTES];\n\n\tAI_ALIGNED(4)\n\tstatic ai_i8 out_data[AI_LED_MONITORING_NETWORK_OUT_1_SIZE_BYTES];\n\n\tai_float arrOutData[3];\n\tchar sOutInfo[64] = {0};\n\n    printf(\"###############################################################\\n\");\n    printf(\"### Neural Network based on truth table of led monitoring   ###\\n\");\n    printf(\"### UC x1 x2  y                                             ###\\n\");\n    printf(\"###  1  0  0  2 &gt; FAILURE &gt; RED LED ON                      ###\\n\");\n    printf(\"###  2  0  1  0 &gt; OFF     &gt; ALL LEDs OFF                    ###\\n\");\n    printf(\"###  3  1  0  1 &gt; ON      &gt; GREEN LED ON                    ###\\n\");\n    printf(\"###  4  1  1  2 &gt; FAILURE &gt; RED LED ON                      ###\\n\");\n    printf(\"###############################################################\\n\\n\");\n\n    \/\/ Use case 1\n    ((ai_float *)in_data)[0] = (ai_float) 0.0f;\n    ((ai_float *)in_data)[1] = (ai_float) 0.0f;\n    aiRun(in_data, out_data);\n\n    Set_arrOutData(out_data, arrOutData);\n    printf(\"Use case 1:\\n\");\n    printf(\"Input = x1=%d and x2=%d\\n\", (int)round(((ai_float *)in_data)[0]),\n      (int)round(((ai_float *)in_data)[1]));\n    printf( \"Output = [%.6f %.6f %.6f] &gt; %s\\n\\n\", arrOutData[0], arrOutData[1],\n       arrOutData[2], Led_State_As_String(Switch_Led(arrOutData), sOutInfo) );\n    HAL_Delay(5000);\n\n    \/\/ Use case 2\n    ((ai_float *)in_data)[0] = (ai_float) 0.0f;\n    ((ai_float *)in_data)[1] = (ai_float) 1.0f;\n    aiRun(in_data, out_data);\n\n    Set_arrOutData(out_data, arrOutData);\n    printf(\"Use case 2:\\n\");\n    printf(\"Input = x1=%d and x2=%d\\n\", (int)round(((ai_float *)in_data)[0]),\n      (int)round(((ai_float *)in_data)[1]));\n    printf( \"Output = [%.6f %.6f %.6f] &gt; %s\\n\\n\", arrOutData[0], arrOutData[1],\n       arrOutData[2], Led_State_As_String(Switch_Led(arrOutData), sOutInfo) );\n    HAL_Delay(5000);\n\n    \/\/ Use case 3\n    ((ai_float *)in_data)[0] = (ai_float) 1.0f;\n    ((ai_float *)in_data)[1] = (ai_float) 0.0f;\n    aiRun(in_data, out_data);\n\n    Set_arrOutData(out_data, arrOutData);\n    printf(\"Use case 3:\\n\");\n    printf(\"Input = x1=%d and x2=%d\\n\", (int)round(((ai_float *)in_data)[0]),\n      (int)round(((ai_float *)in_data)[1]));\n    printf( \"Output = [%.6f %.6f %.6f] &gt; %s\\n\\n\", arrOutData[0], arrOutData[1], \n       arrOutData[2], Led_State_As_String(Switch_Led(arrOutData), sOutInfo) );\n    HAL_Delay(5000);\n\n    \/\/ Use case 4\n    ((ai_float *)in_data)[0] = (ai_float) 1.0f;\n    ((ai_float *)in_data)[1] = (ai_float) 1.0f;\n    aiRun(in_data, out_data);\n\n    Set_arrOutData(out_data, arrOutData);\n    printf(\"Use case 4:\\n\");\n    printf(\"Input = x1=%d and x2=%d\\n\", (int)round(((ai_float *)in_data)[0]), \n       (int)round(((ai_float *)in_data)[1]));\n    printf( \"Output = [%.6f %.6f %.6f] &gt; %s\\n\\n\", arrOutData[0], arrOutData[1],\n        arrOutData[2], Led_State_As_String(Switch_Led(arrOutData), sOutInfo) );\n\n    printf(\"###############################################################\\n\\n\");\n\n    HAL_Delay(5000);\n    \/* USER CODE END 1 *\/\n}<\/pre>\n<p><b>Die DNN-C-Funktion ausf\u00fchren und pr\u00fcfen<\/b><\/p>\n<p>Das Bord wird mit der Software programmiert. Der s<span style=\"font-family: 'courier new', courier, monospace;\">chwarze Reset-Taster<\/span> auf dem Board bet\u00e4tigt. Anschlie\u00dfend im <span style=\"font-family: 'courier new', courier, monospace;\">Serial Port Terminal<\/span> im Tab <span style=\"font-family: 'courier new', courier, monospace;\">Serial<\/span> die Verbindung zum Board mittels einem Klick auf dem <span style=\"font-family: 'courier new', courier, monospace;\">Open<\/span> Button hergestellt.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mike-netz.biz\/wp-content\/uploads\/2021\/03\/0017_LED_Monitoring_Terminal.png\" alt=\"LED monitoring terminal\" width=\"931\" height=\"549\"><\/p>\n<p>Im Ergebnis wird die Schalttabelle als DNN auf dem Mikrocontroller korrekt ausgef\u00fchrt.&nbsp;<img decoding=\"async\" src=\"http:\/\/mike-netz.biz\/wp-content\/plugins\/wp-edit\/plugins\/emoticons\/img\/smiley-cool.gif\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mit dem Erweiterungspaket STM32Cube.AI erm\u00f6glicht STMicroelectronics ein Neuronales Netz auf einen Mikrocontroller auszuf\u00fchren. In dem folgenden Beispiel LED-Monitoring wird ein DNN (Deep Neuronal Network) mit Keras\/Tensorflow erstellt, dann mittels&nbsp;STM32Cube.AI in das C-Projekt importiert und anschlie\u00dfend auf dem Testboard&nbsp; Nucleo-F767ZI ausgef\u00fchrt.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,31],"tags":[20,23,22,14,17,21,19,9,16,15],"class_list":["post-188","post","type-post","status-publish","format-standard","hentry","category-kuenstliche-intelligenz","category-software-entwicklung","tag-c","tag-deep-learning","tag-deep-neural-network","tag-keras","tag-machine-leraning","tag-mikrocontroller","tag-python","tag-stm32","tag-stm32cubeai","tag-tensorflow"],"_links":{"self":[{"href":"https:\/\/mike-netz.biz\/index.php?rest_route=\/wp\/v2\/posts\/188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mike-netz.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mike-netz.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mike-netz.biz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mike-netz.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=188"}],"version-history":[{"count":58,"href":"https:\/\/mike-netz.biz\/index.php?rest_route=\/wp\/v2\/posts\/188\/revisions"}],"predecessor-version":[{"id":443,"href":"https:\/\/mike-netz.biz\/index.php?rest_route=\/wp\/v2\/posts\/188\/revisions\/443"}],"wp:attachment":[{"href":"https:\/\/mike-netz.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mike-netz.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mike-netz.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}