Fix a number of issues with the infrastructure, no major rework
1 unresolved thread
1 unresolved thread
Compare changes
- Alexandru-Mihai GHERGHESCU authored
There was a corner case when the shape of the predictions y of the dataset would not be correct, due to the fact that the number of batches was miscalculated. This happened when `batch_len` was exactly divisible by `seq_len`, since the predictions, which are simply the text shifted once to the right, would not have that extra column at the end. Fix the above issue by decrementing the number of available batches with 1 when `batch_len` exactly divides by `seq_len`.
+ 18
− 2
@@ -51,8 +51,24 @@ class _OptimusDL(Iterable):
Is this faster than
torch.cat(self._data,dim=-1).shape[0]
?