Week 2, WB 2 Emojify_V2 summary(model) throwing error after passing Test

Hello,

I hope someone can help me.

I am at the point where I am getting this error on the Emojify_V2 model. The cell that has this:

model = Emojify_V2((maxLen,), word_to_vec_map, word_to_index)
model.summary()

gives me this error:

ValueError: This model has not yet been built. Build the model first by calling build() or calling fit() with some data, or specify an input_shape argument in the first layer(s) for automatic build.

This error is thrown from model.summary()

I am unsure what I should be getting this error, because just in the previous cell, the model passed the test.

Emojify_V2_test(Emojify_V2) gives “All tests passed!”.

I am this stuck. Any help is most welcome.

Thanks,
Saurav

What’s your line of code for “sentence_indices = …”?
Just post that one line please.

Here is the line:

sentence_indices = Input(shape=input_shape, dtype=‘int32’)

That seems fine. There is likely some other error in your Emojify_v2() function.

Hint: The “Model()” function requires two arguments, the inputs and the outputs. It returns “model”.
See the hint in the notebook here:
image