Попытка преобразовать модель в coreml с помощью coremltools 4.1 НЕ РАБОТАЕТ

Я конвертирую свою модель в coreml с помощью coremltools 4.1, и по какой-то причине я получаю эту ошибку: TypeError: 'InputLayer' object is not iterable и в строке coreml_model = coremltools.converters.keras.convert (model). может кто что я сделал не так в моем коде. Спасибо за помощь. вот мой фрагмент.

import coremltools


coreml_model = coremltools.converters.keras.convert(model)

# setup the meta datas foor our coreml modal
coreml_model.author = 'Author'
coreml_model.license = 'MIT'
coreml_model.short_description = 'Predicts the character passed in as a number between 1-9.'
coreml_model.input_description['image'] = 'A 28x28 pixel grayscale image.'
coreml_model.output_description['output1'] = 'A Multiarray where the index with the greatest float value between 0 and 1 is the recognized number.'
coreml_model.save('NumberRecognition.mlmodel')
print('model converted')

person TheAppGuy21    schedule 22.04.2021    source источник


Ответы (1)