Exemplo n.º 1
0
def test_other(x):
    """
    Write a test that ensures some other property holds for your functions.
    """
    if x > 0:
        assert operators.relu(x) == x
    else:
        assert operators.relu(x) == 0.0
Exemplo n.º 2
0
 def complex(a):
     return (
         operators.log(
             operators.sigmoid(
                 operators.relu(operators.relu(a * 10 + 7) * 6 + 5) * 10
             )
         )
         / 50
     )
Exemplo n.º 3
0
def test_relu(a):
    if a > 0:
        assert operators.relu(a) == a
    else:
        assert operators.relu(a) == 0.0
def test_relu(a):
    if a > 0:
        assert op.relu(a) == a
    else:
        assert op.relu(a) == 0.0
Exemplo n.º 5
0
 def relu(a):
     return operators.relu(a + 5.5)
Exemplo n.º 6
0
def test_other(x):
    """
    Write a test that ensures some other property holds for your functions.
    """
    assert operators.relu(x) == operators.relu_back(x, x)
def test_relu(a):
    if a > 0:
        assert relu(a) == a
    if a < 0:
        assert relu(a) == 0.0
Exemplo n.º 8
0
 def relu(a):
     "Apply relu"
     return operators.relu(a + 5.5)