(self, shape)
Initialize params for GRU including weights and biases.
        The weight matrix and bias matrix are concatenated from the weights
        for inputs and weights for recurrent inputs and bias.
        The shape of the weights are (number of inputs + number of outputs +1 )
        by (number of outputs * 3)

        Arguments:
            shape (Tuple): contains number of outputs and number of inputs
Initialize params for GRU including weights and biases.
        The weight matrix and bias matrix are concatenated from the weights
        for inputs and weights for recurrent inputs and bias.
        The shape of the weights are (number of inputs + number of outputs +1 )
        by (number of outputs * 3)
Initialize params for GRU including weights and biases . The weight matrix and bias matrix are concatenated from the weights for inputs and weights for recurrent inputs and bias . The shape of the weights are ( number of inputs + number of outputs + 1 ) by ( number of outputs * 3 )
def init_params(self, shape):
        """
        Initialize params for GRU including weights and biases.
        The weight matrix and bias matrix are concatenated from the weights
        for inputs and weights for recurrent inputs and bias.
        The shape of the weights are (number of inputs + number of outputs +1 )
        by (number of outputs * 3)

        Arguments:
            shape (Tuple): contains number of outputs and number of inputs

        """
        super(GRU, self).init_params(shape)
        (nout, nin) = shape

        # indices for slicing gate buffers
        (rz1, rz2) = (0, nout * 2)
        (c1, c2) = (nout * 2, nout * 3)

        self.Wrz_recur = self.W_recur[rz1:rz2]
        self.Whcan_recur = self.W_recur[c1:c2]

        self.b_rz = self.b[rz1:rz2]
        self.b_hcan = self.b[c1:c2]

        self.dWrz_recur = self.dW_recur[rz1:rz2]
        self.dWhcan_recur = self.dW_recur[c1:c2]
def init_params ( self , shape ) : super ( GRU , self ) . init_params ( shape ) ( nout , nin ) = shape # indices for slicing gate buffers ( rz1 , rz2 ) = ( 0 , nout * 2 ) ( c1 , c2 ) = ( nout * 2 , nout * 3 ) self . Wrz_recur = self . W_recur [ rz1 : rz2 ] self . Whcan_recur = self . W_recur [ c1 : c2 ] self . b_rz = self . b [ rz1 : rz2 ] self . b_hcan = self . b [ c1 : c2 ] self . dWrz_recur = self . dW_recur [ rz1 : rz2 ] self . dWhcan_recur = self . dW_recur [ c1 : c2 ]