'Initialize the parameters of the layer, either by using sparse initialization or small
isotropic noise.'

def _init_params(self):

    if self.rank_n_approx:
        W_em1 = self.init_fn(self.nin, self.rank_n_approx, self.sparsity, self.scale, self.rng)
        W_em2 = self.init_fn(self.rank_n_approx, self.nout, self.sparsity, self.scale, self.rng)
        self.W_em1 = theano.shared(W_em1, name=('W1_%s' % self.name))
        self.W_em2 = theano.shared(W_em2, name=('W2_%s' % self.name))
        self.b_em = theano.shared(numpy.zeros((self.nout,), dtype=theano.config.floatX), name=('b_%s' % self.name))
        self.params += [self.W_em1, self.W_em2, self.b_em]
        self.myparams = []
        if self.weight_noise:
            self.nW_em1 = theano.shared((W_em1 * 0.0), name=('noise_W1_%s' % self.name))
            self.nW_em2 = theano.shared((W_em * 0.0), name=('noise_W2_%s' % self.name))
            self.nb_em = theano.shared((b_em * 0.0), name=('noise_b_%s' % self.name))
            self.noise_params = [self.nW_em1, self.nW_em2, self.nb_em]
            self.noise_params_shape_fn = [constant_shape(x.get_value().shape) for x in self.noise_params]
    else:
        W_em = self.init_fn(self.nin, self.nout, self.sparsity, self.scale, self.rng)
        self.W_em = theano.shared(W_em, name=('W_%s' % self.name))
        self.b_em = theano.shared(numpy.zeros((self.nout,), dtype=theano.config.floatX), name=('b_%s' % self.name))
        self.add_wghs = []
        self.n_add_wghs = []
        if self.additional_inputs:
            for (pos, sz) in enumerate(self.additional_inputs):
                W_add = self.init_fn(sz, self.nout, self.sparsity, self.scale, self.rng)
                self.add_wghs += [theano.shared(W_add, name=('W_add%d_%s' % (pos, self.name)))]
                if self.weight_noise:
                    self.n_add_wghs += [theano.shared((W_add * 0.0), name=('noise_W_add%d_%s' % (pos, self.name)))]
        self.params += ([self.W_em, self.b_em] + self.add_wghs)
        self.myparams = []
        if self.weight_noise:
            self.nW_em = theano.shared((W_em * 0.0), name=('noise_W_%s' % self.name))
            self.nb_em = theano.shared(numpy.zeros((self.nout,), dtype=theano.config.floatX), name=('noise_b_%s' % self.name))
            self.noise_params = ([self.nW_em, self.nb_em] + self.n_add_wghs)
            self.noise_params_shape_fn = [constant_shape(x.get_value().shape) for x in self.noise_params]
