curiosity/baseline_models.py [34:51]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    def __init__(self, inplace=False):
        super(GeLU, self).__init__()
        self.inplace = inplace

    def forward(self, input_):
        return gelu(input_)


class Clamp(nn.Module):
    def __init__(self, should_clamp: bool = False):
        super(Clamp, self).__init__()
        self._should_clamp = should_clamp

    def forward(self, input_):
        if self._should_clamp:
            return 0.0 * input_
        else:
            return input_
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



curiosity/models.py [34:51]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    def __init__(self, inplace=False):
        super(GeLU, self).__init__()
        self.inplace = inplace

    def forward(self, input_):
        return gelu(input_)


class Clamp(nn.Module):
    def __init__(self, should_clamp: bool = False):
        super(Clamp, self).__init__()
        self._should_clamp = should_clamp

    def forward(self, input_):
        if self._should_clamp:
            return 0.0 * input_
        else:
            return input_
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



