Support for kModelV5
cscribano opened this issue · 4 comments
Great work!
I was able to build and run canmv on Sipeed Maix-Dock, as well as running the provided kpu examples.
I'm experiment with converting a simple cnn (mnist classification):
- nncase 0.2 (kModel v4): successfully compile and run kmodel
- nncase 1.8.0 (kModel v5): succesfully complie, unable to load the model. It fails at
load_kmodel
I'm not sure if canmv has support for kmodel v5, can anyone clarify?
Additional Informations
- Firmware version: 1.04
- Board: Maix-DOCK
- OS: Linux
koad_kmodel
may be need more memory,you can print the free memory before load by this code:
from maix import utils
print("sys mem free:",utils.heap_free())
The memory should be at least larger than the model size or more.
In order to have more memory available for load kmodel, you can use the lite firmware or reduce micropython gc heap, refer to demo_set_gc_heap_size.py
We will try kModel v5 in the near future.
I just ported support for nncasev1/kModelv5 by myself: https://github.com/cscribano/canmv
It is able to run both float and integer models, I will eventually open a PR
Good work. I'm glad to see the PR you submitted. We will review it later after finishing the current work
Here (#31) we have add support for kmodel v5, but it not enabled in normal firmware, you should compile it yourself, i will close this issue as it is completed. if you have any question, feel free to reopen the issue.