# UNQ_C5 DLS Sequence model Wk2:Emojify

I am having trouble with implementing Emojify_V2(input_shape, word_to_vec_map, word_to_index)

I am able to pass the Unit test Emojify_V2_test(target). But when I try model.summary() I am not getting expected model

Model: “model_7”


Layer (type) Output Shape Param #

Total params: 0
Trainable params: 0
Non-trainable params: 0


So how come comparator(summary(model), expectedModel) is passing the code?

Also when I run the following code it fails:

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

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.

First, try resetting the kernel and then run all the cells again.

I found my mistake in Emojify_V2(input_shape, word_to_vec_map, word_to_index).

problem seems to be Emojify_V2_test(): comparator()
It seems to be passing the test when it should be failing as summary(model) is not returning correct output

The test cases don’t catch every possible error in your code.

Update: Another common cause of this error:

Your code for model = Model(...) has to provide both the inputs and outputs arguments.
See the hint here.
image