Пример #1
0
def test_init():
    """
    Test initializations.
    """
    b = msb.Softplus()
    assert isinstance(b, msb.Bijector)
    b = msb.Softplus(1.0)
    assert isinstance(b, msb.Bijector)
Пример #2
0
 def __init__(self):
     super(BackwardJacobian, self).__init__()
     self.b1 = msb.Softplus(2.0)
     self.b2 = msb.Softplus()
Пример #3
0
 def __init__(self):
     super(ForwardBackward, self).__init__()
     self.b1 = msb.Softplus(2.0)
     self.b2 = msb.Softplus()
Пример #4
0
def test_type():
    with pytest.raises(TypeError):
        msb.Softplus(sharpness='sharpness')
    with pytest.raises(TypeError):
        msb.Softplus(name=0.1)
Пример #5
0
 def __init__(self):
     super(Net, self).__init__()
     self.b1 = msb.Softplus(1.0)
     self.b2 = msb.Softplus()
Пример #6
0
 def __init__(self):
     super(Net3, self).__init__()
     self.bijector = msb.Softplus(sharpness=2.0)