tf-coreml / tf-coreml

TensorFlow to CoreML Converter
Apache License 2.0
1.33k stars 168 forks source link

Error adding author and description information into a coreml file #343

Open Jordi100 opened 5 years ago

Jordi100 commented 5 years ago

Hello,

I have some core ml extension files. These has been created from a .pb extension file. When I try to add the author and description information to the coreml file, it launchs the following error.

python[941:28718] IMPORTANT: new sequence length computation failed, falling back to old path. Your compilation was sucessful, but please file a radar on Core ML | Neural Networks and attach the model that generated this message. Input name(s) and shape(s): img_placeholder__0 : (C,H,W) = (3, 400, 300) Neural Network compiler 0: 100 , name = Conv2D:0, output shape : (C,H,W) = (32, 400, 300) Neural Network compiler 1: 120 , name = moments/mean:0, output shape : (C,H,W) = (32, 1, 1) . . .

The python file I use to add the information is:

import tfcoreml as tf_converter import coremltools

model = coremltools.models.MLModel('frozen72.mlmodel')

Set the model metadata

model.author = 'Jorge Rodriguez' model.license = 'creative commons' model.short_description = 'Neural Transfer art file'

model.save('frozen72b.mlmodel')

Can you tell me how to fix this problem? Regards,

Jorge

Jordi100 commented 5 years ago

If I use the core ml extension file in a Xcode project. When the file run, it launch the message:

019-10-10 11:51:51.194936+0200 Art[657:61867] [coreml] IMPORTANT: new sequence length computation failed, falling back to old path. 2019-10-10 11:51:54.148448+0200 Art[657:61867] [coreml] Error computing shape information for Neural Network model. This model may be invalid.

And it works in some iOS devices and does not work in other iOS devices. If the model is not created successfully how does it works in some devices and in other devices it do not work? REgards,

Jorge

1duo commented 5 years ago

Hi @Jordi100, thanks for reporting this issue. This error seems unrelated to setting up metadata. Can you file a bug-report. Detailed information to reproduce this error is appreciated.