mlmodel

MLModel works with MultiArray output but cannot successfully change the output to an image

旧城冷巷雨未停 提交于 2020-12-13 11:16:52
问题 I have converted a Keras model to a MLModel using coremltools 4.0 with limited success. It works but only if I use an MLMultiArray for the output and covert to an image. Converting to an image takes magnitudes longer than inferencing; making it unusable. If I try to change the MLModel spec to use images for output I get this error running prediction: Failed to convert output Identity to image: NSUnderlyingError=0x2809bad00 {Error Domain=com.apple.CoreML Code=0 "Invalid array shape ( 2048,

MLModel works with MultiArray output but cannot successfully change the output to an image

▼魔方 西西 提交于 2020-12-13 11:16:24
问题 I have converted a Keras model to a MLModel using coremltools 4.0 with limited success. It works but only if I use an MLMultiArray for the output and covert to an image. Converting to an image takes magnitudes longer than inferencing; making it unusable. If I try to change the MLModel spec to use images for output I get this error running prediction: Failed to convert output Identity to image: NSUnderlyingError=0x2809bad00 {Error Domain=com.apple.CoreML Code=0 "Invalid array shape ( 2048,