BasicDecoderOutput with None lengths in networks_seq2seq_nmt example
URL(s) with the issue:
https://www.tensorflow.org/addons/tutorials/networks_seq2seq_nmt
Description of issue:
It is not clear what the output of the BasicDecoder is. The output variable is is from type BasicDecoderOutput and has two attributes: rnn_output and sample_id. The output should be (in my opinion) of shape (batch_size, target_leghts, vocab_size) and (batch_size, target_leghts) respectively. When I print the variable in the training loop the larget_lengths is None. Why is this not an issue for the calculation of the loss? and how do I get the real predictions inside the train_step function e.g. to calculate metrics?
Submit a pull request?
Currently not since I don't understand the solution myself. But afterwards, I would create a pull request to share the information.
It just means that the shape is not known when building the graph. Can you try using tf.print instead and see if the actual value is printed?