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?