Created
August 15, 2020 02:14
-
-
Save Namburger/b524e7b70ffe8f3d7b5f1de60a3179c5 to your computer and use it in GitHub Desktop.
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
# Install the edgetpu compiler. | |
!curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
!echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list | |
!sudo apt-get update | |
!sudo apt-get install edgetpu-compiler | |
# Compile our model and make a tarball of the finished trained model. | |
%cd /content/output_model | |
!edgetpu_compiler -s ssdlite_mobiledet_custom.tflite | |
%cd /content/ | |
# Copy the checkpoints, inference graph, pipeline config, and the tflite models | |
!cp -r /content/train/model.ckpt-25000* /content/output_model | |
!cp -r /content/inference_graph/* /content/output_model | |
!tar cvf ssdlite_mobiledet_dog_vs_cat.tar.gz output_model | |
# Download model and you're done! | |
from google.colab import files | |
files.download('/content/ssdlite_mobiledet_dog_vs_cat.tar.gz') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment