. But when I test UNQ_C10, it arises error like image below, Why we can’t use the line like this: output, _ = NMTAttn()((input_tokens, padded_with_batch)). Tks everyone.
If we are talking about UNQ_C6, NMTAttn is passed as an argument ("An LSTM sequence-to-sequence model with attention.) In other words it already is NMTAttn() in the scope of this function.
Regarding your error, you might be using model instead of NMTAttn (if the tests passed but grading did not). Please check for that.
Do not change the code outside the ### START CODE HERE ### and ### END CODE HERE ### .
You changed the # UNIT TEST part which is not good.
My guess of your error was based that you received the error “‘NoneType’ object is not callable” which suggests that you try to call NMTAttn which is None. Which is strange, because that is the argument of the next_symbol (so you might have used 'modelinstead ofNMTAttn` in UNQ_C10).
But that might not be the only reason - either your UNQ_C4 does not return a model (None in this case) something else
First check if UNQ_C4 output is exactly the same as “Expected output”. If that is the case, you should search for the reason why NMTAttn is None in this test (multiple ways to go wrong, especially if you changed the code outside where you supposed to).