tflite application licence small modification

This commit is contained in:
gumj 2021-04-30 10:55:07 +08:00
parent 0abb9999bf
commit a78eb6abbf
8 changed files with 69 additions and 4 deletions

View File

@ -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,

View File

@ -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 <xiuos.h>
#include "tensorflow/lite/micro/all_ops_resolver.h"

View File

@ -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 <xiuos.h>
void mnist_app(void);

View File

@ -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,

9
applications/tflite_mnist/tools/mnist-c-digit.py Normal file → Executable file
View File

@ -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

9
applications/tflite_mnist/tools/mnist-c-model.py Normal file → Executable file
View File

@ -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'

9
applications/tflite_mnist/tools/mnist-inference.py Normal file → Executable file
View File

@ -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

9
applications/tflite_mnist/tools/mnist-train.py Normal file → Executable file
View File

@ -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