Error due to grader or incorrect code?

In Course 5 Week 3 assignment 1 (Neural Machine Translation) when I change n_a from 32 to 10 (n_s = 64) I get a ValueError. I want to know if the error is due to the grader (which only checks for outputs corresponding to n_a = 32) or if there is some other reason.


This error tells me that the input to layer 0 (beginning of model) is not compatible with the layer declaration. Therefore you should change the input to suit the layers parameters.

I am not able to understand can you elaborate, please? What should I change as I am getting the error during initializing the model not while fitting or compiling?

If the model is given to you then change the input but if you build the model then the input to layer 0 needs to be changed. For example if input layer 0 accepts 10 features and you are giving it as input only 4 features it will throw this error.

I am not hard coding the input layer features though

In the output_layer(), if you specified the axis parameter, try removing that.

Or, check any similar unnecessary arguments you may have added to other layers.