diff --git a/docs/requirements.readthedocs.txt b/docs/requirements.readthedocs.txt index e69de29b..ff790594 100644 --- a/docs/requirements.readthedocs.txt +++ b/docs/requirements.readthedocs.txt @@ -0,0 +1 @@ +tensorflow==1.15.4 \ No newline at end of file diff --git a/docs/source/Layers.rst b/docs/source/Layers.rst index 34bb7609..5dc708a4 100644 --- a/docs/source/Layers.rst +++ b/docs/source/Layers.rst @@ -1,4 +1,4 @@ -DeepCTR Layers API +DeepCTR-Torch Layers API ====================== diff --git a/docs/source/Models.rst b/docs/source/Models.rst index 9fc74dfd..52d96c28 100644 --- a/docs/source/Models.rst +++ b/docs/source/Models.rst @@ -1,4 +1,4 @@ -DeepCTR-PyTorch Models API +DeepCTR-Torch Models API ====================== .. toctree:: diff --git a/tests/models/AFM_test.py b/tests/models/AFM_test.py index 57168e0c..420f2865 100644 --- a/tests/models/AFM_test.py +++ b/tests/models/AFM_test.py @@ -22,11 +22,20 @@ def test_AFM(use_attention, sparse_feature_num, dense_feature_num): check_model(model, model_name, x, y) early_stopping = EarlyStopping(monitor='val_binary_crossentropy', min_delta=0, verbose=1, patience=0, mode='min') + + # test callbacks model_checkpoint = ModelCheckpoint(filepath='model.ckpt', monitor='val_binary_crossentropy', verbose=1, save_best_only=True, save_weights_only=False, mode='max', period=1) model.fit(x, y, batch_size=64, epochs=3, validation_split=0.5, callbacks=[early_stopping, model_checkpoint]) + model_checkpoint = ModelCheckpoint(filepath='model.ckpt', monitor='val_binary_crossentropy', verbose=1, + save_best_only=False, + save_weights_only=False, mode='max', period=1) + + model.fit(x, y, batch_size=64, epochs=3, validation_split=0.5, callbacks=[early_stopping, model_checkpoint]) + + if __name__ == '__main__': pass