diff --git a/applications/tflite_mnist/digit.h b/applications/tflite_mnist/digit.h index e95ea4e6b..6ed214cb4 100644 --- a/applications/tflite_mnist/digit.h +++ b/applications/tflite_mnist/digit.h @@ -9,6 +9,15 @@ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. * See the Mulan PSL v2 for more details. */ + +/** +* @file: digit.h +* @brief: store digits in this file +* @version: 1.0 +* @author: AIIT XUOS Lab +* @date: 2020/3/25 +* +*/ const float mnist_digit[] = { 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, diff --git a/applications/tflite_mnist/mnistapp.cpp b/applications/tflite_mnist/mnistapp.cpp index d6a67bbda..49984b2c5 100644 --- a/applications/tflite_mnist/mnistapp.cpp +++ b/applications/tflite_mnist/mnistapp.cpp @@ -9,6 +9,15 @@ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. * See the Mulan PSL v2 for more details. */ + +/** +* @file: mnistapp.cpp +* @brief: mnist function +* @version: 1.0 +* @author: AIIT XUOS Lab +* @date: 2020/3/25 +* +*/ #include #include "tensorflow/lite/micro/all_ops_resolver.h" diff --git a/applications/tflite_mnist/mnistmain.c b/applications/tflite_mnist/mnistmain.c index ed9b2cfc4..291052f90 100644 --- a/applications/tflite_mnist/mnistmain.c +++ b/applications/tflite_mnist/mnistmain.c @@ -9,6 +9,16 @@ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. * See the Mulan PSL v2 for more details. */ + +/** +* @file: mnistmain.c +* @brief: start mnist function +* @version: 1.0 +* @author: AIIT XUOS Lab +* @date: 2020/3/25 +* +*/ + #include void mnist_app(void); diff --git a/applications/tflite_mnist/model.h b/applications/tflite_mnist/model.h index be7732e31..f62440c7b 100644 --- a/applications/tflite_mnist/model.h +++ b/applications/tflite_mnist/model.h @@ -9,6 +9,15 @@ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. * See the Mulan PSL v2 for more details. */ + +/** +* @file: model.h +* @brief: store model weights in this file +* @version: 1.0 +* @author: AIIT XUOS Lab +* @date: 2020/3/25 +* +*/ unsigned char mnist_model[] = { 0x1c, 0x00, 0x00, 0x00, 0x54, 0x46, 0x4c, 0x33, 0x14, 0x00, 0x20, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, diff --git a/applications/tflite_mnist/tools/mnist-c-digit.py b/applications/tflite_mnist/tools/mnist-c-digit.py old mode 100644 new mode 100755 index 93c525c75..e3ca10df5 --- a/applications/tflite_mnist/tools/mnist-c-digit.py +++ b/applications/tflite_mnist/tools/mnist-c-digit.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # ========================================================================================== # Copyright (c) 2020 AIIT XUOS Lab # XiOS is licensed under Mulan PSL v2. @@ -8,8 +9,14 @@ # EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, # MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. # See the Mulan PSL v2 for more details. + +# @file: mnist-c-digit.py +# @brief: print image digit at command line +# @version: 1.0 +# @author: AIIT XUOS Lab +# @date: 2020/3/25 # ========================================================================================== -#!/usr/bin/env python3 + import tensorflow as tf diff --git a/applications/tflite_mnist/tools/mnist-c-model.py b/applications/tflite_mnist/tools/mnist-c-model.py old mode 100644 new mode 100755 index 9b40ddbb1..a2a9c7771 --- a/applications/tflite_mnist/tools/mnist-c-model.py +++ b/applications/tflite_mnist/tools/mnist-c-model.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # ========================================================================================== # Copyright (c) 2020 AIIT XUOS Lab # XiOS is licensed under Mulan PSL v2. @@ -8,8 +9,14 @@ # EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, # MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. # See the Mulan PSL v2 for more details. + +# @file: mnist-c-model.py +# @brief: open file path and load model +# @version: 1.0 +# @author: AIIT XUOS Lab +# @date: 2020/3/25 # ========================================================================================== -#!/usr/bin/env python3 + #tflite_file_path = 'mnist-default-quan.tflite' tflite_file_path = 'mnist.tflite' diff --git a/applications/tflite_mnist/tools/mnist-inference.py b/applications/tflite_mnist/tools/mnist-inference.py old mode 100644 new mode 100755 index a71ddd7ad..65ad7646b --- a/applications/tflite_mnist/tools/mnist-inference.py +++ b/applications/tflite_mnist/tools/mnist-inference.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # ========================================================================================== # Copyright (c) 2020 AIIT XUOS Lab # XiOS is licensed under Mulan PSL v2. @@ -8,8 +9,14 @@ # EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, # MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. # See the Mulan PSL v2 for more details. + +# @file: mnist-inference.py +# @brief: load data amd start model omferemce +# @version: 1.0 +# @author: AIIT XUOS Lab +# @date: 2020/3/25 # ========================================================================================== -#!/usr/bin/env python3 + import tensorflow as tf diff --git a/applications/tflite_mnist/tools/mnist-train.py b/applications/tflite_mnist/tools/mnist-train.py old mode 100644 new mode 100755 index 39815be27..65453caf2 --- a/applications/tflite_mnist/tools/mnist-train.py +++ b/applications/tflite_mnist/tools/mnist-train.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # ========================================================================================== # Copyright (c) 2020 AIIT XUOS Lab # XiOS is licensed under Mulan PSL v2. @@ -8,8 +9,14 @@ # EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, # MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. # See the Mulan PSL v2 for more details. + +# @file: mnist-train.py +# @brief: model training +# @version: 1.0 +# @author: AIIT XUOS Lab +# @date: 2020/3/25 # ========================================================================================== -#!/usr/bin/env python3 + import os import tensorflow as tf