我正在尝试在我的应用程序中实现可更新模型的新 CoreML 3 功能,但我无法弄清楚。
我在 Keras 中创建了一个具有 2 层的神经网络,并将其转换为核心 ML 模型。然后我将模型包含到我的 iOS 项目中。然而self.testmodel.model.modelDescription.isUpdatable
总是错误的,我无法理解苹果文档。
model = Sequential([
Dense(10, activation="sigmoid", input_shape=(2,)),
Dense(2, activation="relu"),
])
core_mlmodel = coremltools.converters.keras.convert(model)
core_mlmodel.save("FirstNN.mlmodel")
集成到 Swift 我现在可以使用模型,但不能更新它
let testmodel = FirstNN()
try testmodel.prediction(input: input) // works
testmodel.model.modelDescription.isUpdatable // is false
为什么我的模型不可更新,我该如何更改?