From 199f932db031dd956d489cee52dd1227b2a26eed Mon Sep 17 00:00:00 2001 From: Frances Hartwell Date: Wed, 11 Oct 2023 09:27:33 -0400 Subject: [PATCH] reset loss_values df on refit --- deepecho/models/par.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deepecho/models/par.py b/deepecho/models/par.py index b728989..a9009bf 100644 --- a/deepecho/models/par.py +++ b/deepecho/models/par.py @@ -327,6 +327,9 @@ def fit_sequences(self, sequences, context_types, data_types): pbar_description = 'Loss ({loss:.3f})' iterator.set_description(pbar_description.format(loss=0)) + # Reset loss_values dataframe + self.loss_values = pd.DataFrame(columns=['Epoch', 'Loss']) + X_padded, seq_len = torch.nn.utils.rnn.pad_packed_sequence(X) for epoch in iterator: Y = self._model(X, C)