You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Code scan] Fix diff_on eigenvalue loss indexing for 2D band tensors #357
This issue is part of a Codex global repository scan.
Problem: EigLoss.forward asserts that eig_pred_cut and eig_label_cut are 2D tensors, but the diff_on branch indexes them as if they were 3D ([:, k_diff_i, :]).
Impact:
Any run with diff_on=True raises an indexing error instead of computing the differential eigenvalue loss.
Suggested fix:
Index the k-point dimension consistently for 2D tensors, for example eig_label_cut[k_diff_i, :] - eig_label_cut[k_diff_j, :], with the same correction for predictions and masked variants.
Activity