apple / coremltools

Core ML tools contain supporting tools for Core ML model conversion, editing, and validation.
https://coremltools.readme.io
BSD 3-Clause "New" or "Revised" License
4.44k stars 643 forks source link

Supporting for reading model created by CreateML #195

Closed onevcat closed 6 years ago

onevcat commented 6 years ago

Hi,

When I try to load a mlmodel file created by CreateML from Xcode 10, it throws this error:

model = coremltools.models.MLModel("ImageClassifier.mlmodel")

> Error compiling model: "Error reading protobuf spec. 
> validator error: Model did not specify a valid model-parameter type."

It seems that the model loading fails when validating. Maybe we need to add the new "Image Classifier " to the spec?

Any idea on how I could read and explore the inside of a CreateML model? Thanks!

aseemw commented 6 years ago

are you using coremltools 2.0b1? (if not, you should try with it. You can install it by pip install coremltools==2.0b1)

onevcat commented 6 years ago

@aseemw Oh, yes. The latest version works for it perfectly! Thanks!