Warning: output_shape argument not specified

Hello,

I just starting (Lesson 1) and seeing this warning. Couldn’t find anything on severity of this:

/home/ubuntu/anaconda2/lib/python2.7/site-packages/keras/layers/core.py:577: UserWarning: output_shape argument not specified for layer lambda_3 and cannot be automatically inferred with the Theano backend. Defaulting to output shape (None, 3, 224, 224) (same as input shape). If the expected output shape is different, specify it via the output_shape argument.
.format(self.name, input_shape))

Any potential issues with my install/config?
(I running it on my own PC)

1 Like

I see this warning on my t2 instance as well. Searched the forums, the internet, even the keras slack channel… nada. I then tried running Lesson 1 on my p2 instance and it ran clean i.e. no such warning. Thought about building another t2 instance but moved forward running the kaggle dogscats-redux data set on the p2 box instead which also runs clean. If I get back to rebuilding a t2 machine and re-testing Lesson 1, I’ll let you know the results.

Can you show us the contents of your keras config file (~/.keras/keras.json) ?

Here it is:

ubuntu@blackbox:~$ cat .keras/keras.json
{
    "image_dim_ordering": "th",
    "epsilon": 1e-07,
    "floatx": "float32",
    "backend": "theano"
}

That looks fine. I see it’s just a warning - does it work OK for you?

So far yes, thank you.

Is there a live group/course is going on in Bay area - or now it’s online only for now?

Gleb

@gesman, there’s the second part of the certification coming up soon, in SF:

1 Like

Great thank you,
Sent email to datainstitute@usfca.edu

This warning is a result of recent Keras changes:

I’ve submitted a pull request here, to prevent the warning when using vgg16.py and vgg16bn.py here:

1 Like

Sweet – thank you sir!!

Looking at the code in Vgg16.py in the create function there is a line :-
model.add(Lambda(vgg_preprocess, input_shape=(3,224,224), output_shape=(3,224,224)))
Suggest the line in the VGG16 model should be changed with the one above.
Tried it my self and it worked

1 Like