Please click on my name to start a private message. Then, attach your notebook as a .ipynb file. Please note that mentors cannot access your Coursera Jupyter workspace, so sending the notebook in a .ipynb format is essential.
Please fix the tests that failed in the notebook. Look at the lectures and sample labs for hints if the markdown explanation is insufficient.
Here’s the feedback from preprocess_dataset:
Failed test case: Got wrong data type for the preprocessed texts.
Expected: int64
Got: object
Failed test case: Got wrong data type for the preprocessed labels.
Expected: int64
Got: object
Failed test case: Got wrong shape for the preprocessed texts. Make sure that MAX_LENGTH is set to 120 before submitting.
Expected: (32, 120)
Got: (32,)
adding hints to balaji comments, the data conversion code is the first code line in preprocessed grade function if you have not edited any INSTRUCTIONS given in the assignment.
The third expected output is because you probably are either using dataset.map incorrect or the lambda functions incorrectly.
The assignment you are doing has nongrade cell which also provide you hint on that.
The only thing in hint is not mentioned the dataset need to be build using lambda function but text and labels together in one code line.
Hope that helps you debug.
There are also many previous thread which could have helped you resolve your issue. so always explore first the search option for similar issue threads.
Balaji, I am sure you already know that I had this information before raising the issue?
My question is precisely how this is supposed to work because I have already tried everything that was mentioned in the classes and the labs and NOTHING WORKED. I hope I am making myself clear that NOTHING that was mentioned in the classes or the samples have worked to resolve this.
So yes the lectures and the sample labs are very much insufficient and your response is of absolute no help here.
I have already explored the previous threads before raising this topic (on which you have commented that I should be raising a new topic if I have a problem - please decide what it is you want us to do) and they didn’t help either.
I didn’t know that. Learners with diverse skill levels take up this specialization and it wouldn’t surprise me if you didn’t look at the unit test feedback and expected something interesting by submitting to the grader.
This lab is a multi-class text classification problem. We know that neural networks (NNs) only understand numbers and don’t understand text. preprocess_dataset is the last step before feeding data to the NN. Given that we have access to the dataset where each entry is a tuple of form (sentence, label) in string format, your only option is to transform this into (encoded text, encoded label) using text_vectorizer and label_encoder provided as parameters to the function. Look at C3_W1_Lab2_sequences_basic.ipynb and C3_W1_Assignment.ipynb on how to use TextVectorizer and StringLookup to encode text to numbers.