From ecdaf0a28add4143d5fb80a8ffae22d45af5f7cb Mon Sep 17 00:00:00 2001 From: bertsky Date: Mon, 4 Mar 2024 14:10:52 +0100 Subject: [PATCH] generators: do not require input length > window size --- ocrd_keraslm/lib/rating.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocrd_keraslm/lib/rating.py b/ocrd_keraslm/lib/rating.py index 8f9d9dd..e6413fe 100644 --- a/ocrd_keraslm/lib/rating.py +++ b/ocrd_keraslm/lib/rating.py @@ -1004,7 +1004,7 @@ def _gen_data(self, text, context, steps, train=False, split=None): sequences = [] next_chars = [] i = 0 - assert size > self.length + #assert size > self.length for i in range(self.length if self.stateful else 0, size, steps): if isinstance(split, np.ndarray): if (split[int(i/steps)] < self.validation_split) == train: