Last active
September 5, 2019 20:25
-
-
Save anoken/d13be16526cd8606ac6390f0412212e0 to your computer and use it in GitHub Desktop.
convert_tfline_kmodel_nncase_v0.2.0.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Usage: ./convert.sh modelxxx.tflite" | |
name=`echo $1 | cut -d '.' -f 1` | |
tflite_out=$name.tflite | |
kmodel_out=$name.kmodel | |
#nncase | |
# https://github.com/kendryte/nncase | |
# wget https://github.com/kendryte/nncase/releases/download/v0.2.0-alpha1/ncc-linux-x86_64.tar.xz | |
ncc_exe=~/nncase/ncc | |
echo ">> Converting TFlite to Kmodel" | |
$ncc_exe compile $tflite_out ./$kmodel_out -i tflite -o kmodel -t k210 --dataset images | |
echo ">> OK. Not if all goes well, copy $kmodel_out to scr folder" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment