Exercise

Part 1: Understanding GRU models

Did you know these models can remember even up to thousands of time steps compared to standard recurrent neural networks which can usually remember less than hundred time steps only. Understanding GRU models is essential to use them effectively to implement machine translation models.

In this exercise, you will implement a simple model that has an input layer and a GRU layer. You will then use the model to produce output values for a random input array.

Don't be discouraged that you are using random data. The objective of this exercise is to understand the shape of the outputs produced by the GRU layer. In later chapters, you will feed in actual sentences to GRU layers to perform translation.

Instructions 1/3

undefined XP
    1
    2
    3
  • Define a Keras input layer with batch size 2, sequence length 3 and input dimensionality 4. Remember that you can define an input layer using the keras.layers.Input(<argument>=<value>) syntax.