Commit 72400bf9 authored by mihaivanea's avatar mihaivanea
Browse files

Ready to train the model.

parent 0e6c74cb
......@@ -65,11 +65,29 @@ sgd = SGD(lr=0.001, momentum=0.0, decay=0.0, nesterov=False)
##Define a loss function for the classifier.
#classifier_loss = categorical_crossentropy()
model.compile(optimizer=[rms, sgd], loss=)
##Define a loss function for the regressor.
#classifier_loss = mean_squared_error()
model.compile(
optimizer=[rms, sgd],
loss=["categorical_crossentropy", "mean_squared_error"])
# Load the new model on FDDB.
# TODO: Generator still doens't work.
fddb_path_train = "../fddb/FDDB-folds/FDDB-fold-01-ellipseList.txt"
fddb_path_valid = "../fddb/FDDB-folds/FDDB-fold-02-ellipseList.txt"
# Loading the training and validation data from FDDB.
x_train, y_train = load_arrays_fddb(fddb_path_train)
x_valid, y_valid = load_arrays_fddb(fddb_path_valid)
# Train the new model on FDDB.
model.fit(
x_train, y_train,
batch_size=16,
epochs=10,
verbose=1,
validation_data=(x_valid, y_valid))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment