encoder-decoder

Tensorflow – Decoder for Machine Translation

Tensorflow – Decoder for Machine Translation Question: I am going through Tensorflow’s tutorial on Neural Machine Translation using Attention mechanism. It has the following code for the Decoder : class Decoder(tf.keras.Model): def __init__(self, vocab_size, embedding_dim, dec_units, batch_sz): super(Decoder, self).__init__() self.batch_sz = batch_sz self.dec_units = dec_units self.embedding = tf.keras.layers.Embedding(vocab_size, embedding_dim) self.gru = tf.keras.layers.GRU(self.dec_units, return_sequences=True, return_state=True, recurrent_initializer=’glorot_uniform’) …

Total answers: 1