C3W2 Expected output

Hi DP,

Although the unit test passes, the shape output of batch train/validation is not what was expected :

Shape of the train batch: (32, 120)
Shape of the validation batch: (32, 120)

Expected output:

Shape of the train batch: (32, 120)
Shape of the validation batch: (32, 120)

In turn this is causing isues when runging model predictions and fitting…

Any help appreciated!


create_model()


Joseph, did you get the fresh copy as per discussed in DM?

Please look at cell with execution ID 206. The expected and actual shapes don’t match.

Click my name and message your notebook as an attachment so that I can pass it on to the course staff to improve tests.

@balaji.ambresh this issue is being addressed, his fit label encoder seems to be edited.

I am already addressing it.

Sounds good @Deepti_Prasad . Please file a ticket on the course repo.

@balaji.ambresh there is no issue with notebook, when I told to make change for another error, he encountered this error and when I looked at his codes, seemed like he extra code line added, so I advised him to get first fresh copy.

I am sharing the linked error to this error which was encountered first, just in case any learner encountered similar error. The IOPub data rate limit error is usually because of incorrect recalling of dataset when text and labels were recalled separately, but in case dataset was recalled correct and still model shows incorrect parameters, then next lookout was fit label encoder, where for this learner I suspected there was editing/addition of codes lines which got transferred to the dataset codes.

Regards
DP

see this?
image

preprocess_dataset is used to create train_proc_dataset and validation_proc_dataset. Since the learner output doesn’t match the expected output in the markdown, test_preprocess_dataset should catch the mistake as well.

But I cannot raise this yet until I see the learner has followed the instructions as per given in assignment as I saw the codes, there were addition of 2 extra code lines and as you know a unittest might not catch an error for hard-coded path, it will throw an error in the following test cell.

if unittest didn’t catch the test even after following the instructions then i will report to repo.

Sorry Balaji I keep tagging the wrong person as that name appears first :joy::pray:t2:

Morning DP,

Apologies for the delay in replying. I am now using a fesh copy of the notebook [C3W2_Assignment.ipynb].

I have moved my code to fresh , however I am still getting a mismatch in the train and validation batch shape.

Attached is an updated copy of
[C3W2_Assignment.ipynb|attachment]

THank you!

I have sent you DM

In the preprocess data, basically there are 3 call arguments already assigned for this grade cell.

one is dataset for you to preprocess
next text_vectorizer which is function recall to convert your text data into vector
and lastly label_encoder which you recalled in the previous grade cell will be used to encode data labels here in this cell, preparing your preprocess data to be model trained.

You need to define this in single code line using map keys( ) to the argument dataset.

Hope this resolves your issue as per our DM discussion.

Feel free to ask if more doubts.

Keep Learning!!!
Regards
DP

1 Like