Exemplo n.º 1
0
def test_relu():
    assert session7.relu([0, 1, 2, 3, -1, -2, -3]) == [0, 1, 2, 3, 0, 0, 0]
Exemplo n.º 2
0
def test_TC05_q2_3_relu(test_data, expected):
    assert session_ut.relu(test_data) == expected
Exemplo n.º 3
0
def test_relu():
    Relu_input = [1, 2, 3, 4, 5, -8, -9, 10, -100]
    assert session7.relu(Relu_input) == [1, 2, 3, 4, 5, 0, 0, 10,
                                         0], "Relu is not functioning properly"
Exemplo n.º 4
0
def test_relu():
    neurons = [12, 23, -12.2, 13.6, 0, 123.33, -12, -44, -0.0007]
    assert session7.relu(neurons) == [
        12, 23, 0, 13.6, 0, 123.33, 0, 0, 0], "You don't know what ReLU is"
Exemplo n.º 5
0
def test_relu_arg():
    assert session7.relu([1, 4, 0, -3, 1.2]) == [1, 4, 0, 0, 1.2], "Incorrect result from relu"
Exemplo n.º 6
0
def test_relu_ve_str():    
    with pytest.raises(ValueError) as e_info:
        _ = session7.relu([1, 4, 7, 'd'])
Exemplo n.º 7
0
def test_relu_ve_list():    
    with pytest.raises(ValueError) as e_info:
        _ = session7.relu(5)
Exemplo n.º 8
0
def test_relu():
    r = session7.relu([1,5,-9,32,-45])
    assert r == [1, 5, 0, 32, 0], "Your function is not working properly"