From 8447a6e185ad89d9b09845adcdf427d8bfa39817 Mon Sep 17 00:00:00 2001 From: Alex Moreo Date: Fri, 8 May 2020 15:48:53 +0200 Subject: [PATCH] lowering patience to 10 --- src/model/classifiers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model/classifiers.py b/src/model/classifiers.py index 7f81a29..6f277d5 100644 --- a/src/model/classifiers.py +++ b/src/model/classifiers.py @@ -19,7 +19,7 @@ class AuthorshipAttributionClassifier(nn.Module): self.padder = Padding(pad_index=pad_index, max_length=pad_length, dynamic=True, pad_at_end=False, device=device) self.device = device - def fit(self, X, y, batch_size, epochs, patience=20, lr=0.001, val_prop=0.1, alpha=1., log='../log/tmp.csv', checkpointpath='../checkpoint/model.dat'): + def fit(self, X, y, batch_size, epochs, patience=10, lr=0.001, val_prop=0.1, alpha=1., log='../log/tmp.csv', checkpointpath='../checkpoint/model.dat'): assert 0 <= alpha <= 1, 'wrong range, alpha must be in [0,1]' early_stop = EarlyStop(patience) batcher = Batch(batch_size=batch_size, n_epochs=epochs)