Hi @januttall
As mentioned by @paulinpaloalto you do need to restart and clear output, save and resubmit for the error related to get_sentence_vectorizer grade cell as your code for this cell is correct but the next cell contain mention of [:1000] which might have got somehow got error, so the best way to resolve this issue would be to get a fresh copy and re-do the assignment.
But your codes needs correction for other grade cell, I will explain you as per grade cell name.
- for GRADED FUNCTION: label_vectorizer
You have mentioned the below code for element id as empty list
Use the dictionaty tag_map passed as an argument to the label_vectorizer function
# to make the correspondence between tags and numbers.
element_ids = [ ]
HOW TO CORRECT:
The tag_map
is a dictionary that maps the tags that you could have to numbers. Run the cell below to see the possible classes you will be predicting. So Use the tag_maps.get function to the token with the corresponding value of -1 under the for token loop
- for masked accuracy grade cell, your codes are incorrect for
A. Create the mask, i.e., the values that will be ignored
FOR THIS YOU HAVE WRITTEN CORRECT CODE BUT MARKED IT # USING tf.not_equal was correct and using != is incorrect.
B. Multiply the acc tensor with the masks
you do not require tf.cast to get the matches_true_pred, the first code line was enough.
C. INCORRECT CODES FOR Compute masked accuracy (quotient between the total matches and the total valid values, i.e., the amount of non-masked values)
YOU DO not REQUIRE TO USE tf.cast.
as you applied separately tf.reduce_sum which was correct you did not require to use corresponding padding value of -1.
Instruction only mentions you to check quotient between matches_true_pred to mask. Here tupling the numerator to denominator also need to be done.
With being said all this, I feel there must have been some editing in your assignment which caused the issue with your first grade cell, so I highly recommend you get a fresh copy and then re-do these corrections before submit the assignment.
HOW TO GET A FRESH COPY: Check below link
Let me know if the issue still persist.
P.S. Sorry for the delayed response as I was busy in work.
Regards
DP