Created
August 15, 2019 15:32
-
-
Save naxty/d5e2bf5323b54ea6b4e002602e35f0e2 to your computer and use it in GitHub Desktop.
Keras to Core ML export
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
import coremltools | |
model = coremltools.converters.keras.convert( | |
model.h5', | |
input_names=['image'], | |
output_names=['output'], | |
class_labels=["0", "1"], | |
image_input_names='image', | |
red_bias = -1, | |
green_bias = -1, | |
blue_bias = -1, | |
image_scale = 1.0/127.5 | |
) | |
model.save(“model.mlmodel”) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment