Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when run " python coreml.py" #62

Open
feifeiwei opened this issue Jan 7, 2020 · 5 comments
Open

error when run " python coreml.py" #62

feifeiwei opened this issue Jan 7, 2020 · 5 comments

Comments

@feifeiwei
Copy link

warnings.warn('No training configuration found in save file: '
0 : input_1, <keras.engine.topology.InputLayer object at 0x136f29590>
1 : convolution2d_1, <keras.layers.convolutional.Convolution2D object at 0x136f29850>
2 : batchnormalization_1, <keras.layers.normalization.BatchNormalization object at 0x136f29950>
3 : leakyrelu_1, <keras.layers.advanced_activations.LeakyReLU object at 0x136f64c10>
4 : maxpooling2d_1, <keras.layers.pooling.MaxPooling2D object at 0x136f7a650>
5 : convolution2d_2, <keras.layers.convolutional.Convolution2D object at 0x136fa7690>
6 : batchnormalization_2, <keras.layers.normalization.BatchNormalization object at 0x136fb9310>
7 : leakyrelu_2, <keras.layers.advanced_activations.LeakyReLU object at 0x136fc3750>
8 : maxpooling2d_2, <keras.layers.pooling.MaxPooling2D object at 0x136fcb150>
9 : convolution2d_3, <keras.layers.convolutional.Convolution2D object at 0x136fe3f10>
10 : batchnormalization_3, <keras.layers.normalization.BatchNormalization object at 0x136fed7d0>
11 : leakyrelu_3, <keras.layers.advanced_activations.LeakyReLU object at 0x136ff5fd0>
12 : maxpooling2d_3, <keras.layers.pooling.MaxPooling2D object at 0x136ffd9d0>
13 : convolution2d_4, <keras.layers.convolutional.Convolution2D object at 0x13701f7d0>
14 : batchnormalization_4, <keras.layers.normalization.BatchNormalization object at 0x137029090>
15 : leakyrelu_4, <keras.layers.advanced_activations.LeakyReLU object at 0x137032890>
16 : maxpooling2d_4, <keras.layers.pooling.MaxPooling2D object at 0x13703a290>
17 : convolution2d_5, <keras.layers.convolutional.Convolution2D object at 0x13704b550>
18 : batchnormalization_5, <keras.layers.normalization.BatchNormalization object at 0x13705b910>
19 : leakyrelu_5, <keras.layers.advanced_activations.LeakyReLU object at 0x13706d150>
20 : maxpooling2d_5, <keras.layers.pooling.MaxPooling2D object at 0x13706db10>
21 : convolution2d_6, <keras.layers.convolutional.Convolution2D object at 0x1370b3910>
22 : batchnormalization_6, <keras.layers.normalization.BatchNormalization object at 0x1370bb1d0>
23 : leakyrelu_6, <keras.layers.advanced_activations.LeakyReLU object at 0x1370c29d0>
24 : maxpooling2d_6, <keras.layers.pooling.MaxPooling2D object at 0x1370cb3d0>
25 : convolution2d_7, <keras.layers.convolutional.Convolution2D object at 0x1370ef1d0>
26 : batchnormalization_7, <keras.layers.normalization.BatchNormalization object at 0x1370efa50>
27 : leakyrelu_7, <keras.layers.advanced_activations.LeakyReLU object at 0x1370fe290>
28 : convolution2d_8, <keras.layers.convolutional.Convolution2D object at 0x1370fec50>
29 : batchnormalization_8, <keras.layers.normalization.BatchNormalization object at 0x13711ea90>
30 : leakyrelu_8, <keras.layers.advanced_activations.LeakyReLU object at 0x137130810>
31 : convolution2d_9, <keras.layers.convolutional.Convolution2D object at 0x137139210>
/Users/feifeiwei/coreml/lib/python2.7/site-packages/coremltools/models/model.py:111: RuntimeWarning: You will not be able to run predict() on this Core ML model. Underlying exception message was: Error compiling model: "Error reading protobuf spec. validator error: Layer 'convolution2d_1' consumes an input named 'image' which is not present in this network.".
RuntimeWarning)
Traceback (most recent call last):
File "coreml.py", line 18, in
coreml_model.input_description['image'] = 'Input image'
File "/Users/feifeiwei/coreml/lib/python2.7/site-packages/coremltools/models/model.py", line 81, in setitem
raise AttributeError("No feature with name %s." % key)
AttributeError: No feature with name image.

@doughtmw
Copy link

I experienced some similar issues as yourself which ended up being due to the compatibility of Keras, Tensorflow and CoreML installations. Try the following configuration:

coremltools==3.2
Keras==2.2.4
tensorflow==1.14.0

@NOxDriver
Copy link

I'm having this same issue.
After doing @doughtmw's suggestion, I get this:
ValueError: Improper config format: {u'l2': 0.0005000000237487257, u'name': u'L1L2Regularizer', u'l1': 0.0}

@roanacla
Copy link

Same issue as @NOxDriver

@hollance
Copy link
Owner

If you get errors you're likely using the wrong versions of one or more packages.

@roanacla
Copy link

I fixed the issue using coremltools==0.6.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants