def _train_fprop(self, state_below):
        output = super(Noisy_RELU, self)._train_fprop(state_below)

        if self.batch_count > self.num_batch:
            return output * (output > self.threshold)

        else:
            self.batch_count += 1
            output = output + theano_rand.normal(size=output.shape, std=self.std, dtype=floatX)
            output = output * (output > self.threshold)
            activity = theano.mean(output > 0, axis=0)
            self.activity = self.alpha * activity + (1-self.alpha) * self.activity
            self.threshold += self.threshold_lr * (self.activity - self.sparsity_factor)
            return output * (output > self.threshold)
dataset/ETHPy150Open hycis/Pynet/pynet/layer.py/Noisy_RELU._train_fprop/original