def weights_init_func(self, rng, n_inputs, n_outputs): """ this function should be rewrote by children classes default would return all zeros :param rng: passed random state to generate random values :param n_inputs: number of inputs :param n_outputs: number of outputs """ return tu.shared_zeros((n_inputs, n_outputs), name='W')
def init_biases(self): biases = [] for i, outputs in enumerate(self.layers[1:]): b = tu.shared_zeros((outputs,), name='b%d' % (i + 1)) biases.append(b) return biases
def init_weights(self): weights = [] for i, (inputs, outputs) in enumerate(zip(self.layers[:-1], self.layers[1:])): w = tu.shared_zeros((inputs, outputs), name='w%d%d' % (i, i + 1)) weights.append(w) return weights
def init_biases(self): self.b = tu.shared_zeros(self.get_outputs_shape(), 'b')
def init_biases(self): self.b = tu.shared_zeros(self.n_feature_map, 'b')