Session Ready
Exercise

Link between the trained and inference model

Here you will be transferring the trained weights from the trained model to the inference model. In the encoder decoder model, there are three layers with parameters. They are,

  • The encoder GRU layer
  • The decoder GRU layer
  • The decoder Dense layer

The other layers, such as TimeDistributed do not have any parameters, thus don't require the copying of weights.

For this exercise, you have been provided with the trained encoder GRU layer (tr_en_gru), trained decoder GRU (tr_de_gru) and the trained Dense layer (tr_de_dense). You also have access to all the layers of the inference model (including the encoder) such as the encoder GRU layer (en_gru), decoder GRU (de_gru) and the Dense layer (de_dense).

Instructions
100 XP
  • Load the weights of the trained encoder GRU layer.
  • Set the weights of the encoder GRU layer of the inference model.
  • Load the weights for the decoder GRU layer (trained) and set the weights in the inference model.
  • Load the weights of the decoder Dense layer (trained) and set the weights in the inference model.