

def prepare(self):
    self.output_dim = self.hidden_size
    self.W_h = self.create_weight(self.hidden_size, self.hidden_size, 'h', initializer=self.inner_init)
    self.b_h = self.create_bias(self.hidden_size, 'h')
    self.register_parameters(self.W_h, self.b_h)
    self.input_weights = []
    if (self._input_type == 'sequence'):
        all_input_dims = ([self.input_dim] + self.additional_input_dims)
        for (i, input_dim) in enumerate(all_input_dims):
            wi = self.create_weight(input_dim, self.hidden_size, 'wi_{}'.format((i + 1)), initializer=self.outer_init)
            weights = [wi]
            self.input_weights.append(weights)
            self.register_parameters(*weights)

dataset/ETHPy150Open zomux/deepy/deepy/layers/recurrent.py RNN.prepare/original