Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Coreml: Model class has not been generated yet

Tags:

xcode

ios

coreml

I've converted model from keras with coremltools, added it to project and added to targets. And then when i'm pressing on model in navigator in Model Class section i'm getting "Model class has not been generated yet.". What does it mean?

enter image description here

like image 381
mirt Avatar asked Sep 15 '17 21:09

mirt


3 Answers

It means you first need to build your project (Cmd+B). The model class is generated as part of the build process.

like image 50
Matthijs Hollemans Avatar answered Oct 13 '22 20:10

Matthijs Hollemans


target -> Build Setting -> CoreML Model Compiler - Code Generation -> CoreML Generated Model Inherits NSObject -> YES

enter image description here

like image 27
Jiang Avatar answered Oct 13 '22 21:10

Jiang


Cited from apple dev forum:

Xcode has stopped automatically adding the coreml model to the build settings of your project. To solve, go to your target, go to build phases, find compile sources and add your coreml model. After this, the model class is generated.

like image 5
mirt Avatar answered Oct 13 '22 22:10

mirt