Unable to extract model type from stream

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *dataPath = [documentsDirectory stringByAppendingPathComponent:@"SqueezeNet.mlmodel"];
NSURL *fileURL = [NSURL fileURLWithPath:dataPath];
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"SqueezeNet" withExtension:@"mlmodel"];


I have the above piece of code, and have the SqueezeNet.mlmodel file downloaded from apple, and I get the following error:


MLModelAsset: modelWithError: load failed with error Error Domain=com.apple.CoreML Code=0 "Unable to extract model type from stream in compiled model: Error opening file stream: /Users/fbence/Documents/SqueezeNet.mlmodel/coremldata.bin: unspecified iostream_category error" UserInfo={NSLocalizedDescription=Unable to extract model type from stream in compiled model: Error opening file stream: /Users/fbence/Documents/SqueezeNet.mlmodel/coremldata.bin: unspecified iostream_category error}


What am I doing wrong?

Replies

I am also facing the same issue but only with iOS 13 & iOS 13.1 .Below OS Version it works fine.Were you able to find any rootacause /workaround ?Did you file a bug in apple ? I tried filing it but it got failed in feedback assistant app.