def define_params(self):
        '''
        Define parameters.
        '''
        input_dim = self.input_dim
        hidden_dim = self.hidden_dim
        prefix = self.name
        self.w_matrix = tf.Variable(tf.random_normal([input_dim, 3 * hidden_dim], stddev=0.1),
                                    name='/'.join([prefix, 'W']))
        self.U = tf.Variable(tf.random_normal([hidden_dim, 3 * hidden_dim], stddev=0.1),
                             name='/'.join([prefix, 'U']))
        self.bias = tf.Variable(tf.random_normal([1, 3 * hidden_dim], stddev=0.1),
                                name='/'.join([prefix, 'b']))
        return self
def define_params ( self ) : input_dim = self . input_dim hidden_dim = self . hidden_dim prefix = self . name self . w_matrix = tf . Variable ( tf . random_normal ( [ input_dim , 3 * hidden_dim ] , stddev = 0.1 ) , name = '/' . join ( [ prefix , 'W' ] ) ) self . U = tf . Variable ( tf . random_normal ( [ hidden_dim , 3 * hidden_dim ] , stddev = 0.1 ) , name = '/' . join ( [ prefix , 'U' ] ) ) self . bias = tf . Variable ( tf . random_normal ( [ 1 , 3 * hidden_dim ] , stddev = 0.1 ) , name = '/' . join ( [ prefix , 'b' ] ) ) return self
Define parameters.