Skip to content

Commit

Permalink
generators: do not require input length > window size
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Mar 4, 2024
1 parent ccd1c0f commit ecdaf0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocrd_keraslm/lib/rating.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ecdaf0a

Please sign in to comment.