I know the model prediction (“output”) must be obtained by calling the NMTAttn model with the tuple (input_tokens, padded_with_batch) as parameters, but I can’t understand this as the NMTAttn function is defined with a completely different signature.
Could anyone please explain why this call is correct?
and the first parameter of the function NMTAttn is an already instantiated model, it is NOT the NMTAttn function that you wrote in Exercise 4. In some other part of the program it is supposed to happen something like:
so inside the function “next_symbol” you will get the instantiated model with the name NMTAttn .
Hence it is a model ready to be called passing the two inputs as parameters.