Hi, I try to submit Week 4’s assignment but there is a grader error. I get 50 points from my training history, but I can not complete graded functions.
Here is the error:
Details of failed tests for n_gram_seqs
Failed test case: There was an error grading this function. Details shown in ‘got’ value below:.
Expected:
no exceptions,
but got:
module ‘learner_mod’ has no attribute ‘n_gram_seqs’.
Details of failed tests for pad_seqs
Failed test case: There was an error grading this function. Details shown in ‘got’ value below:.
Expected:
no exceptions,
but got:
module ‘learner_mod’ has no attribute ‘pad_seqs’.
Details of failed tests for features_and_labels
Failed test case: There was an error grading this function. Details shown in ‘got’ value below:.
Expected:
no exceptions,
but got:
module ‘learner_mod’ has no attribute ‘features_and_labels’.
Details of failed tests for create_model
Failed test case: There was an error grading this function. Details shown in ‘got’ value below:.
Expected:
no exceptions,
but got:
module ‘learner_mod’ has no attribute ‘create_model’.
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, on discourse.
At first I would ask you to get a fresh copy of the assignment, I fixed errors of your file then uploaded. But it gave the same errors.It may be that your notebook lost part of important metadata which is essential for the grader.
Then I took a fresh copy and wrote the same, fixing your errors , it passed with 100%.
Modifications to be made :
2. Under # GRADED FUNCTION: pad_seqs
You need to return pad_sentences as a numpy array here using np.array. You haven’t done that.
It’s given in the hint :
Notice that this function receives a list of sequences and should return a numpy array with the padded sequences.
3. Under # Train the model,
You have changed the epochs from 50 to 500 to get it above 80%, because to pass this assignment, accuracy of at least 80% is required, but your architecture is giving around 50% after completing the 50th epoch.
You are only supposed to write code for where it’s mentioned like within this :
### START CODE HERE
....
....
### END CODE HERE
Dont modify anything else.
Keep it epochs=50.
Solution to this is also written in the hint :
If your model didn’t achieve this threshold, try training again with a different model architecture, consider increasing the number of units in your LSTM layer.
So you need to do that.
4. Under # GRADED FUNCTION: create_model :
You have used
Bidirectional(LSTM(30))), Increase this to a larger number.
Doing these will perfectly give you 100%.
Happy learning!
Failed test case: There was an error grading this function. Details shown in ‘got’ value below:.
Expected:
no exceptions,
but got:
module ‘learner_mod’ has no attribute ‘n_gram_seqs’.
Details of failed tests for pad_seqs
Failed test case: There was an error grading this function. Details shown in ‘got’ value below:.
Expected:
no exceptions,
but got:
module ‘learner_mod’ has no attribute ‘pad_seqs’.
Details of failed tests for features_and_labels
Failed test case: There was an error grading this function. Details shown in ‘got’ value below:.
Expected:
no exceptions,
but got:
module ‘learner_mod’ has no attribute ‘features_and_labels’.
Details of failed tests for create_model
Failed test case: There was an error grading this function. Details shown in ‘got’ value below:.
Expected:
no exceptions,
but got:
module ‘learner_mod’ has no attribute ‘create_model’.