def forward(self, x): """ Implementation of softplus. Overflow avoided by use of the logaddexp function. self._lower is added before returning. """ return np.logaddexp(0, x) + self._lower