Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created December 18, 2017 21:23
Show Gist options
  • Save azamsharp/ded0bc3eb812e75d00406cf6f1f51ae6 to your computer and use it in GitHub Desktop.
Save azamsharp/ded0bc3eb812e75d00406cf6f1f51ae6 to your computer and use it in GitHub Desktop.
convertor.py
import tfcoreml as tf_converter
tf_converter.convert(tf_model_path = 'inception_v1_2016_08_28_frozen.pb',
mlmodel_path = 'InceptionV1.mlmodel',
output_feature_names = ['InceptionV1/Logits/Predictions/Softmax:0'],
image_input_names = 'input:0',
class_labels = 'imagenet_slim_labels.txt',
red_bias = -1,
green_bias = -1,
blue_bias = -1,
image_scale = 2.0/255.0
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment