Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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
You can’t perform that action at this time.