INNER CODE UNIT · Python

__init__

ematvey/hierarchical-attention-networks · bn_lstm.py:55

    def __init__(self, num_units, training):
        self.num_units = num_units
        self.training = training

    @property
    def state_size(self):
        return (self.num_units, self.num_units)

    @property
    def output_size(self):
        return self.num_units

    def __call__(self, x, state, scope=None):
        with tf.variable_scope(scope or 'bn_lstm'):
            c, h = state

            x_size = x.get_shape().as_list()[1]
            W_xh = tf.get_variable('W_xh',

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…