def relu(self, x, alpha=0., max_value=None): x = T.nnet.relu(x, alpha) if max_value is not None: x = T.minimum(x, max_value) return x