kendryte / tensorflow-workspace

Tensorflow workspaces for training your custom models of K210
66 stars 25 forks source link

Compile mobilenet to K210 #1

Closed xhsonny closed 5 years ago

xhsonny commented 5 years ago

Hi,

Could you give instructions on how to use kendryte-model-compiler to compile the mobilenet checkpoint? Thanks.

xhsonny commented 5 years ago

Can anyone from Kendryte team take a look? Thanks.

xhsonny commented 5 years ago

Resolved in https://github.com/kendryte/tensorflow-workspace/commit/d80f0d2ac23287aaf8b116c9cd3769b90c720bee. Thanks.

TMaysGGS commented 5 years ago

Hi,

Thanks for you work on this problem. But I just tried the steps from your solutions and am stuck in the following step:

.\ncc.exe -i tflite -o k210code --dataset .\dataset\ .\bin\mobilenetv1.tflite .\bin\mobilenetv1.c

It shows: Fatal: output-format.

So I checked the output-format options and there are only 'tf', 'tflite' or 'k210model' to choose. I chose 'k210model' and ran it again: \ncc.exe -i tflite -o k210model --dataset .\dataset\ .\bin\mobilenetv1.tflite .\bin\mobilenetv1.c and then I got a .kmodel file rather than the .c file.

I wonder if you can help me with that. Thanks a lot.

TMaysGGS

xhsonny commented 5 years ago

Yeah, nncase removed .c output after version v0.1.0 RC1. You will need to download a version before that. https://github.com/kendryte/nncase/releases

TMaysGGS commented 5 years ago

Yeah, nncase removed .c output after version v0.1.0 RC1. You will need to download a version before that. https://github.com/kendryte/nncase/releases

Hi, I have tried to download the old versions in the link below but it seems those links is invalid now. And the official engineer said it no longer supports transferring to .c file anymore. Do you know how we can use the kmodel file for deployment?

xhsonny commented 5 years ago

Try this: https://github.com/kendryte/nncase/issues/5#issuecomment-472674354?

I haven't used kmodel yet so don't know for sure how this works.

TMaysGGS commented 5 years ago

Try this: kendryte/nncase#5 (comment)?

I haven't used kmodel yet so don't know for sure how this works.

I have tried it and it worked sometimes while sometimes not. It will be better if there are more examples on how to use this. But I will keep working on it.

Thanks for your reply.