Skip to content

Instantly share code, notes, and snippets.

@Namburger
Created August 15, 2020 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Namburger/d1b23748764f45ba7a1eb77b413f0baf to your computer and use it in GitHub Desktop.
Save Namburger/d1b23748764f45ba7a1eb77b413f0baf to your computer and use it in GitHub Desktop.
# Now we can convert this custom trained model to a CPU tflite model
!tflite_convert \
--output_file="/content/output_model/ssdlite_mobiledet_dog_vs_cat.tflite" \
--graph_def_file="/content/output_model/tflite_graph.pb" \
--inference_type=QUANTIZED_UINT8 \
--input_arrays="normalized_input_image_tensor" \
--output_arrays="TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3" \
--mean_values=128 \
--std_dev_values=128 \
--input_shapes=1,320,320,3 \
--allow_custom_ops
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment