'This class implements a GRU.'

def __init__(self, in_size, hidden_size):

    self.hidden_size = hidden_size
    self.in_size = in_size
    self.Wxc = np.zeros((hidden_size, in_size))
    self.Wxr = np.zeros((hidden_size, in_size))
    self.Wxz = np.zeros((hidden_size, in_size))
    self.Rhc = np.zeros((hidden_size, hidden_size))
    self.Rhr = np.zeros((hidden_size, hidden_size))
    self.Rhz = np.zeros((hidden_size, hidden_size))
    self.bc = np.zeros((hidden_size, 1))
    self.br = np.zeros((hidden_size, 1))
    self.bz = np.zeros((hidden_size, 1))
    self.weights = [self.Wxc, self.Wxr, self.Wxz, self.Rhc, self.Rhr, self.Rhz, self.bc, self.br, self.bz]
    self.names = ['Wxc', 'Wxr', 'Wxz', 'Rhc', 'Rhr', 'Rhz', 'bc', 'br', 'bz']
    self.weights_ind_Wxc = 0
    self.weights_ind_Wxr = 1
    self.weights_ind_Wxz = 2
    self.weights_ind_Rhc = 3
    self.weights_ind_Rhr = 4
    self.weights_ind_Rhz = 5
    self.weights_ind_bc = 6
    self.weights_ind_br = 7
    self.weights_ind_bz = 8
