Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce VINC reporter file size by >1000x #219

Merged
merged 6 commits into from
May 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Temporarily disable Platt scaling
  • Loading branch information
norabelrose committed May 3, 2023
commit bdd00cd0c86cd51618b4e45e5b62b53381a960e1
11 changes: 6 additions & 5 deletions elk/training/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,12 @@ def apply_to_layer(
val_pair=(val_x0, val_x1),
)

(_, v, k, _) = first_train_h.shape
reporter.platt_scale(
to_one_hot(repeat(train_gt, "n -> (n v)", v=v), k).flatten(),
rearrange(first_train_h, "n v k d -> (n v k) d"),
)
# TODO: Enable Platt scaling for CCS once normalization is fixed
# (_, v, k, _) = first_train_h.shape
# reporter.platt_scale(
# to_one_hot(repeat(train_gt, "n -> (n v)", v=v), k).flatten(),
# rearrange(first_train_h, "n v k d -> (n v k) d"),
# )

elif isinstance(self.net, EigenReporterConfig):
# We set num_classes to None to enable training on datasets with different
Expand Down