TF1,C3,WK 2 Assignent re tokenize_labels

My results and correct answers are:
First 5 labels of the training set should look like this: [[ 0] [146] [643] [643] [781]] First 5 labels of the validation set should look like this: [[781] [ 0] [ 0] [643] [643]] Tokenized labels of the training set have shape: (1780, 1) Tokenized labels of the validation set have shape: (445, 1)

Expected Output:

First 5 labels of the training set should look like this:

It appears that somehow I have mixed the sentences in with the labels. Everything seemed correct up to this point. Please help me find my error.

Hello @Michael_Crabtree ,

Send me your notebook via dm such that I can check where it went wrong.By clicking on the profile picture, you will see an option to message.There you can attach your notebook. Then we can discuss the issues here, under the topic you created.

With regards,
Nilosree Sengupta

Now I have another problem regarding:
C3_Week 4 Assignment
I cannot get my model above an accuracy of about 72%. I have tried everything I know:
Increased LSTM units
Increased output_dim of Embedding layer
added a 2nd LSTM layer
tried a Conv1D + GlobalMaxPooling layer
altered the learning rate
Increase # epochs to 200
I am stuck! I must be missing something. Please help.

BTW, my model graded out perfectly:

Graded Functions

Filename: Graded Functions

50/50Score: 50 of 50

Grader output

All tests passed for n_gram_seqs! All tests passed for pad_seqs! All tests passed for features_and_labels! All tests passed for create_model!

Hello @Michael_Crabtree ,

Send me your most updated notebook via dm.

With regards,
Nilosree Sengupta

Hello @Michael_Crabtree ,

I have gone through your notebook C3W2.
Under GRADED FUNCTION: tokenize_labels
def tokenize_labels(all_labels, split_labels):

For converting labels to sequences,
Under # Convert labels to sequences

You wrote :
label_seq = tokenizer.texts_to_sequences(split_labels)

It will be :
label_seq = label_tokenizer.texts_to_sequences(split_labels)

You missed “label_”

Fixing this is giving the desired output.

With regards,
Nilosree Sengupta

Hello @Michael_Crabtree ,

Yeah sure! We will help you.

But, this is assignment C3W4.Kindly make a separate topic for C3W4 under C3W4 category.

As per community guidelines, learners need to create separate topic for errors for different week categories.

With regards,
Nilosree Sengupta