Assignment error, Natural Language Processing with Sequence Models C3_W1 activation version

Hi I get the error on GRULM part

Failed test case: Layer is different than expected.
[‘Dense’, (None, 128, 4), 132, ‘log_softmax’],
but got:
[‘Dense’, (None, 128, 4), 132, ‘log_softmax_v2’].

activation function version should not fail the part,

also for the log_perplexity part the parts 5 and 6 give error

You posted in the wrong course so be mindful where you post!

The error has probably got to do with how you declare the activation in:

  • tf.nn.log_softmax: Log of the output probabilities. docs
    • You don’t need to set any parameters, just set the activation parameter as activation=tf.nn.log_softmax.

Tag corrected!

Yes instead of activation=‘log_softmax’
Using the class from nn solves the issue,
But probably the controlling script can be updated

The error from the perplexity computation control is also there still, thanks

What are the errors in perplexity function. I am sure its something you are doing wrong on your end. The best course of action is always to recheck your solutions…

There is a division operation in the perplexity computation where the denominator gets zero and breaks some cases for the controlling code
So seems some kind of check is necessary

Adding some small coefficient like 1e-6 to the denominator breaks some other cases,

Checking if the denominator is zero also breaks some cases

I think more instructions are necessary for this question and the error might result from the python notebooks update