def test_init(): """ Test initializations. """ b = msb.Softplus() assert isinstance(b, msb.Bijector) b = msb.Softplus(1.0) assert isinstance(b, msb.Bijector)
def __init__(self): super(BackwardJacobian, self).__init__() self.b1 = msb.Softplus(2.0) self.b2 = msb.Softplus()
def __init__(self): super(ForwardBackward, self).__init__() self.b1 = msb.Softplus(2.0) self.b2 = msb.Softplus()
def test_type(): with pytest.raises(TypeError): msb.Softplus(sharpness='sharpness') with pytest.raises(TypeError): msb.Softplus(name=0.1)
def __init__(self): super(Net, self).__init__() self.b1 = msb.Softplus(1.0) self.b2 = msb.Softplus()
def __init__(self): super(Net3, self).__init__() self.bijector = msb.Softplus(sharpness=2.0)