I know this course is running for a long time
but i see something in the code that doesnt make sense to me
even though the tests pass
in modelf(Tx, Ty, n_a, n_s, human_vocab_size, machine_vocab_size):
there are two s
- S = s0
- _, s, c = post_activation_LSTM_cell(
in theory i need the small s to be passed in the sequence of LSTM
however S holds the initial value and not being reassigned with s
also the attention model needs the s as well and not the S
but again the s is first defined only within the loop
am i missing something? or maybe there is a legacy code here and tests
*https://www.coursera.org/learn/nlp-sequence-models/programming/L0BBe/neural-machine-translation
1 Like
Your title refers to Week 2 of DLS C5, but I think you are talking about the Neural Machine Translation assignment in Week 3.
In my notebook, the template code for modelf
contains this line before the main loop over the timesteps:
s = s0
Note that it is not capital s. Then at each iteration s is both an input to and an output from the post_activation_LSTM_cell
.
That seems completely consistent to me, so am I just missing your point? Or did you perhaps inadvertently modify some of the template code that was given to you? You can always get a clean copy and compare, as described here.
1 Like
in my code it is S = s0 not s = s0.
so this is was exactly my point…it should be s = s0
you confirmed my concern thanks i already changed it in the notebook
i wonder where the change came from
You must have accidentally overwritten that character. As I mentioned above, you can prove this to yourself by getting a clean copy of the assignment. Science!
1 Like