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.
This exercise is part of the course
Machine Translation with Keras
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
import tensorflow.keras as keras
import numpy as np
# Define an input layer
inp = keras.layers.____(____=(____))