Skip to content
Snippets Groups Projects

Fix a number of issues with the infrastructure, no major rework

Merged Alexandru-Mihai GHERGHESCU requested to merge fix/general_small_fixes into main
1 unresolved thread

Fix a number of issues present in the code:

  • type issues
  • README.md issues
  • variable initializations
  • model issues
  • training loss / number of batches calculation issues

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
51 51
52 52 print(f"Done. Took {time.time() - start:.2f}s.")
53 53
54 self.num_batches = torch.cat(self._data,
55 dim=-1).shape[0] // self.bs // self.seq_len
54 # pre-calculate the number of batches in the dataset
55
56 # Note: there's a special case we need to be careful about; since the
57 # predictions are simply the inputs shifted to the right by one value;
58 # there's a case when the dataset ends before we can get these
59 # shifted-right predictions; this occurs iff `batch_len % seq_len == 0`;
60 # to avoid this, we have to be explicit about the available number of
61 # batches (by simply subtracting 1 from the total number of available
62 # batches)
63 dataset_stream_len = 0
64 for sample in self._data:
  • Vlad-Andrei BĂDOIU (78692) approved this merge request

    approved this merge request

  • mentioned in commit ba87b2ba

  • Please register or sign in to reply
    Loading