C3W4 Assignment create_model Problem with the network architecture

I have the following problem with the network architecture in the function model.fit

What should be the dimension of the last layer? and the sizes in between

Mi net architecture is :

model = Sequential()
    ### START CODE HERE
   
    

Hello Jose,

Please remove the code from the post as it is against the community guidelines. Please share your notebook in personal DM, click on my name then message.

Looks like there is a convolutional layer mismatch, expected differs from your output, check yourself. If you are not able to find, send the notebook.

Regards
DP

Hello Jose,

Please do not copy and paste code, while you do such activities you tend to includes # and extra spaces while copying the codes.

Errors in your notebook

  1. in your padding sequence, you need to first define the input_Sequence with np.array and pre padding.(refer ungraded lab or Lawrence video’s for the same week) you will find the answer.
    GRADED FUNCTION: pad_seqs
    def pad_seqs(input_sequences, maxlen):

  2. The second error where you have copy and pasted code.

GRADED FUNCTION: create_model

def create_model(total_words, max_sequence_len):
The reason I got to know was your forgot to remove the #while you were pasting the code and also the extra spacing while you pasting got included.

  1. Also for the same section your code is incorrect. HINT: Array-like with class values to be converted into a matrix (integers from 0 to num_classes - 1
    refer this link to do correction to your create model.
    tf.keras.utils.to_categorical  |  TensorFlow v2.13.0

Although we all at one time might have copied codes while learning, but at least always make sure to avoid doing that to learn and understand better model architecture, and even if you are copying, at least type, and do not copy and paste. P.S. I am not telling you to do such practice.

Regards
DP

I hope you cleared your issue!!!

yes @Deepti_Prasad