ARM-software / ML-KWS-for-MCU

Keyword spotting on Arm Cortex-M Microcontrollers
Apache License 2.0
1.12k stars 414 forks source link

How to implement pb file in Android App #136

Open Xxfore opened 4 years ago

Xxfore commented 4 years ago

Hi ,

After i train and freeze to pb file by following commands:

python2 train.py --model_architecture ds_cnn --model_size_info 5 64 10 4 2 2 64 3 3 1 1 64 3 3 1 1 64 3 3 1 1 64 3 3 1 1 --dct_coefficient_count 10 --window_size_ms 40 --window_stride_ms 20 --learning_rate 0.0005,0.0001,0.00002 --how_many_training_steps 10000,10000,10000 --summaries_dir work/DS_CNN/DS_CNN1/retrain_logs --train_dir work/DS_CNN/DS_CNN1/training

python2 freeze.py --model_architecture ds_cnn --model_size_info 5 64 10 4 2 2 64 3 3 1 1 64 3 3 1 1 64 3 3 1 1 64 3 3 1 1 --checkpoint ./work/DS_CNN/DS_CNN1/training/best/ --output_file ds_cnn.pb

so that i get a pb file named ds_cnn.pb Does it have simple way to implement it into Android App? Is there any guide about it?

Thank a lot. Wait for your kindness reply

saichand07 commented 4 years ago

Check this out: https://github.com/tensorflow/examples/blob/master/lite/examples/speech_commands/android/README.md