Emojify_V2 convert indiecs to X

Can somebody help this is my error?

AssertionError Traceback (most recent call last)
—> 30 Emojify_V2_test(Emojify_V2)

in Emojify_V2_test(target)
22 model = target((maxLen,), word_to_vec_map, word_to_index)
—> 24 assert type(model) == Functional, “Make sure you have correctly created Model instance which converts "sentence_indices" into "X"”
26 expectedModel = [[‘InputLayer’, [(None, 4)], 0], [‘Embedding’, (None, 4, 2), 30], [‘LSTM’, (None, 4, 128), 67072, (None, 4, 2), ‘tanh’, True], [‘Dropout’, (None, 4, 128), 0, 0.5], [‘LSTM’, (None, 128), 131584, (None, 4, 128), ‘tanh’, False], [‘Dropout’, (None, 128), 0, 0.5], [‘Dense’, (None, 5), 645, ‘linear’], [‘Activation’, (None, 5), 0]]

AssertionError: Make sure you have correctly created Model instance which converts “sentence_indices” into “X”

Please ensure that Emojify_V2 returns an instance of Model created using the functional API.

Hello skull,

is your issue resolved?

Look into the section where you have to use correct codes while converting sentence_indices into X

This is hint for you to compare with your output to compare if you have applied the correct input, embedding, LSTM, Dropout, Dense and activation to your model :point_down:


Hello, I am facing the same issue while I am running in my local machine. There are no problems when I am running in course era notebook.

I checked type of my model and what is expected.
My model type: <class ‘keras.src.engine.functional.Functional’>
Expected Model type: <class ‘tensorflow.python.keras.engine.functional.Functional’>

Can you help me sort this in my local machine?

Running the assignments locally means you have to deal with getting a compatible set of versions of all of the tools and packages.

This task is left to the student.