Comments (6)
Hi,
the value in the dictionary stands for scale for now, which means int_value = scale * fp_value,
the output_exponent value in config json file shoule be -log2(scale)
will export to exponent value in the next version
For your own model, the steps are mostly correct:
1.prepare a float32 model, and convet to onnx model
2. you can basically follow the code in example.py, some modification is needed
model_path = 'mnist_model_example.onnx'
- change to your own onnx model path
calib_dataset = test_images[0:5000:50]
- the calibration dataset should be selected from your own validation dataset
3/4. get the out_exponent from -log2(scale) and then setp3, step4 as you said
the step3/4 will be supported in the quantization tool as well for convenience, but it's still testing, you can experiment it by calling export_coefficient_to_cpp(model, pickle_file_path, target_chip, output_path, name). a new version will be released soon.
If there is any question or suggestion, please feel free to let us know
from esp-dl.
@Auroragan
Hi,
In which dynamic library can I locate this function(export_coefficient_to_cpp
), and when will the next version be?
from esp-dl.
Hi, @PureHing
Please check the latest master branch.
the function is in calibrator, you can refer to the code in example.py:
calib.export_coefficient_to_cpp(model_proto, pickle_file_path, 'esp32s3', '.', 'test_mnist', True)
from esp-dl.
@Auroragan Exporting finish, the output files are: ./test_mnist.cpp, ./test_mnist.hpp,and Does the .npy files
is necessary for convert.py
?
from esp-dl.
the purpose of convert.py is to convert coefficients which are in .npy files to .cpp and .hpp, which is the same as export_coefficient_to_cpp function
if you can use export_coefficient_to_cpp to convert, you don't need to use convert.py anymore
from esp-dl.
Thanks much
from esp-dl.
Related Issues (20)
- autotvm:Cannot find tuning records for: target=c -keys=cpu -model=esp32 (AIV-653) HOT 7
- Problem with PSRAM in the tutotial/convert_tool_example with esp32-S3-DevKitC-1 (AIV-655) HOT 1
- Color Detector model's Size bias issue (AIV-657) HOT 4
- Allow using esp-dl with esp-idf v5.1 and newer (AIV-658) HOT 2
- 报错version `GLIBC_2.27' not found (AIV-659) HOT 1
- add 'Constant' operation (AIV-666)
- tvm_example 目录下 scrip.sh脚本生成的newproject 编译成功 但下载到板子里运行报错 (AIV-668)
- How to save face ID to sdcard instead of flash (AIV-669)
- Evalutor only supports esp32s3? (AIV-671) HOT 1
- ESP-DL TVM: UnboundLocalError: local variable 'bias_add' referenced before assignment (AIV-674) HOT 1
- ESP-DL Quant Tool | TVM conversion & deployment on ESP32S3-EYE (AIV-675) HOT 2
- ESP-DL tutorial/tvm_example No module named 'tvm.relay.op.contrib.esp' (IDFGH-12113) (AIV-678) HOT 4
- ESP32 Model Deployment Project using TVM (AIV-682) HOT 14
- Face recognition: enrolled face not persisting in Arduino IDE (AIV-683)
- custom model with TVM deployment error function 'TVMGetLastPythonError' not found (AIV-685)
- Question about memory usage of models that are build with the ESP-DL Quantization Tool (AIV-686) HOT 1
- Get Started link in the Readme is not working (AIV-688) HOT 2
- Latency of Face Recognition (AIV-689) HOT 2
- Movement detection (AIV-691)
- 参照官方提供的使用 ESP-DL 深度学习库基于 ESP32-S3 实现手势识别的这篇文章中在2.3评估里使用了里面的代码但是报错(前面完全按照示例走) (AIV-693) HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-dl.