I just completed the NLP specialization. Really great content across the board that will take a lot of woodshedding to master. However, in my opinion the content creators are let down by the notebook inline comments. There are several categories of issues I think the team should strongly consider addressing.
First, apparent leakage of code review generated content into production releases. Here’s an example from C1_W2
# CODE REVIEW COMMENT: This has been changed!! word_list was described as a dictionary, but defined (and operated on) as a list
Yikes. Why is an end-user ever seeing anything tagged CODE REVIEW COMMENT. How is this an approved change in production code? Here is a similar type of comment in the Question Duplicate exercise, C3_W4,
# GRADING COMMENT: Also valid to use
# Q1.extend([vocab[word]])
Second, it appears that there might have been some kind of global replace run that truncated comments in many places in the exercises. Here’s an example from C4_W2
# Note: softmax = None
One presumes at one time an expression or equation might have been there, but what remains is not only not helpful, but confusing. There are some places in the code where None is supposed to remain. But if you take that comment literally and actually implement softmax = None
the code will fail. Here is another example from C3_W1
# compute `fastnp.maximum` among 0.0 and `A`
# A = None
There is an A
in the Triplet Loss function, is it referring to that? Maybe, but the next line says
# compute `fastnp.maximum` among 0.0 and `B`
# B = None
and there is no B
anywhere I can find in the notebook. In both cases, taking fastnp.maximum(0.0, None)
doesn’t produce desired results. Here’s one more.
# Call the data generator (built in Ex 01) with shuffle= None
Folks, shuffle
needs to be False
there. The exercise instructions just above the graded function contain this bullet in the list (emphasis in the original!)
- Use the data generator to load q1, q2 a batch at a time. Don’t forget to set shuffle=False!
Third, there are straight up mistakes. This one from C4_W4 is clearly a cut and paste error from the previous function
# concatenate y1 and y2 along the depth dimension
x =
The comment should reference x1
and x2
Fourth, cosmetic spelling and grammar mistakes. Obviously doesn’t impact completing the assignments or the learning objectives, but reflects overall attention to detail. Here’s an example from C3_W4
# use batch size chuncks of actual output targets
The content development and actual code reflects world class thought leadership and talent. It deserves more from the production and release teams.