Need help with # UNQ_C2 C5WK3A1 Neural Machine Translation Assignment

Please help. I have worked on this error most of the day and I have not been able to make any progress. I am fairly certain it involves the passing of context vector to the LSTM. However, I am out of options to try.

thank you,

James


TypeError Traceback (most recent call last)
in
33
34
—> 35 modelf_test(modelf)

in modelf_test(target)
10
11
—> 12 model = target(Tx, Ty, n_a, n_s, len_human_vocab, len_machine_vocab)
13
14 print(summary(model))

in modelf(Tx, Ty, n_a, n_s, human_vocab_size, machine_vocab_size)
47 # Don’t forget to pass: initial_state = [hidden state, cell state]
48 # Remember: s = hidden state, c = cell state
—> 49 _, s, c = post_activation_LSTM_cell(…)
50
51 # Step 2.C: Apply Dense layer to the hidden state output of the post-attention LSTM (≈ 1 line)

TypeError: call() missing 1 required positional argument: ‘inputs’

The error message seems pretty clear: it’s telling you that the arguments you supplied when you called the function post_activation_LSTM_cell are incomplete. There needs to be one called inputs and you give it a value, as in inputs = someVariable.

Note that they gave you a pretty explicit example of how to invoke that function in the instructions for UNQ_C2.

1 Like

To close the loop on the public thread, we had a DM conversation to share the code and it turns out to be an error in the values passed for the “initial state” argument on the call to post_activation_LSTM_cell.