C4W1 Exercise4 Translator

I passed the quick check but the unit test gave me the error as below. I wonder what could be done wrong?

Hi @Yizhuo_Han

You probably hard coded 12000 value somewhere where you should have used vocab_size parameter (most probably in the decoder’s output layer).


1 Like

Hi, I have not hard coded 12000… for the decoder output layer I have self.output_layer = tf.keras.layers.Dense(
I wonder if i used the wrong log_softmax activation function? dont know if it matters

From the instructions:

Make sure to use a logsoftmax activation function for this one, which you can get as tf.nn.log_softmax.

It’s a shame, but in my experience in TensorFlow it matters (whether “log_softmax” or tf.nn.log_softmax).