Beispiel #1
0
def test_dense_toy_dataset_model_with_missing_labels():
    model = dense_model(toy_dataset())
    x_train, y_train, x_test, y_test = toy_dataset()
    with pytest.raises(AssertionError) as err:
        plot_loss(model, ((x_train, y_train), (x_test, y_test)),
                  dataset_labels=('tranining set', ))

    assert err.type is AssertionError
    assert "Datasets and labels length must be the same" in str(err.value)
Beispiel #2
0
def test_dense_toy_dataset_model():
    model = dense_model(toy_dataset())
    _, _, x_test, y_test = toy_dataset()
    plot_loss(model, (x_test, y_test))
Beispiel #3
0
def test_dense_toy_dataset_number_of_points_41():
    model = dense_model(toy_dataset())
    _, _, x_test, y_test = toy_dataset()
    plot_loss(model, (x_test, y_test), number_of_points=41)
Beispiel #4
0
def test_dense_toy_dataset_model_with_labels():
    model = dense_model(toy_dataset())
    x_train, y_train, x_test, y_test = toy_dataset()
    plot_loss(model, ((x_train, y_train), (x_test, y_test)),
              dataset_labels=('tranining set', 'test set'))
Beispiel #5
0
def test_dense_toy_dataset_model_multiple_datasets():
    model = dense_model(toy_dataset())
    x_train, y_train, x_test, y_test = toy_dataset()
    plot_loss(model, ((x_train, y_train), (x_test, y_test)))
Beispiel #6
0
def test_dense_toy_dataset_model():
    model = dense_model(toy_dataset())
    _, _, x_test, y_test = toy_dataset()
    plot_loss_3D(model, "levels", x_test, y_test)
Beispiel #7
0
def test_dense_toy_dataset_num_points_3():
    model = dense_model(toy_dataset())
    _, _, x_test, y_test = toy_dataset()
    plot_loss_3D(model, "levels", x_test, y_test, number_of_points=3)