准备CoreML模型时出错:不支持CoreML代码生成 [英] Error preparing CoreML model: "<something>" is not supported for CoreML code generation

查看:148
本文介绍了准备CoreML模型时出错:不支持CoreML代码生成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在修改本教程,并且出现此错误:

I am modifying the code from this tutorial and I'm getting this error:

为代码生成准备CoreML模型"Resnet50.mlmodel"时出错: 目标的主要语言快速界面"不支持 CoreML代码生成.请将COREML_CODEGEN_LANGUAGE设置为 首选语言

Error preparing CoreML model "Resnet50.mlmodel" for code generation: Target's predominant language "Swift Interface" is not supported for CoreML code generation. Please set COREML_CODEGEN_LANGUAGE to preferred language

以前使用"Places205-GoogLeNet"模型进行编译的项目.

The project used to compile before with the "Places205-GoogLeNet" model.

还有其他人遇到同样的事情吗?

Anyone else experiencing the same?

推荐答案

在应用目标的项目设置视图中,将设置COREML_CODEGEN_LANGUAGE更改为Swift.

In the project settings view for your app target, Change the setting COREML_CODEGEN_LANGUAGE to Swift.

在Xcode 9 beta中,默认设置Automatic在所有情况下均无法正常工作.

The default setting Automatic is not working correctly in all cases in Xcode 9 beta.

在苹果开发人员列表此处中也提到了此问题.

This issue was also mentioned on the apple developer lists here.

这篇关于准备CoreML模型时出错:不支持CoreML代码生成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆