Skip to content

Instantly share code, notes, and snippets.

@frogermcs
Created June 4, 2019 20:59
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 frogermcs/3a36ac7d885927417890bc3801424b7e to your computer and use it in GitHub Desktop.
Save frogermcs/3a36ac7d885927417890bc3801424b7e to your computer and use it in GitHub Desktop.
# Load previously saved CoreML model of MobileNet v2
mlmodel = coremltools.models.MLModel('mobilenet_v2_1.0_224.mlmodel')
# Get spec from the model
spec = mlmodel.get_spec()
print(spec.description)
# Output
# >> input {
# >> name: "input__0"
# >> type {
# >> imageType {...}
# >> }
# >> }
# >> output {
# >> name: "MobilenetV2__Predictions__Reshape_1__0"
# >> type { ... }
# >> }
# >> output {
# >> name: "classLabel"
# >> type { ... }
# >> }
# >> predictedFeatureName: "classLabel"
# >> predictedProbabilitiesName: "MobilenetV2__Predictions__Reshape_1__0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment