【发布时间】:2021-02-15 07:29:00
【问题描述】:
我正在使用 Swift 制作图像分类 iOS 应用。
当我写作时
guard let model = try? VNCoreMLModel(for: SqueezeNet().model) else { return }
我收到了这个警告。
'init()' is deprecated: Use init(configuration:) instead and handle errors appropriately.
你知道如何摆脱它吗?
【问题讨论】:
-
错误信息很清楚。您应该使用
SqueezeNet(configuration:)而不是SqueezeNet()。