Skip to content

Commit

Permalink
临时禁用分项测量
Browse files Browse the repository at this point in the history
  • Loading branch information
hzhangxyz committed Aug 16, 2024
1 parent 462c7c8 commit 8447116
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tetragono/tetragono/sampling_neural_state/observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,11 @@ def __call__(self, configurations, amplitudes, weights, multiplicities):
self._total_log_ws += multiplicity * amplitude.abs().log().item()

for name, observers in self._observer.items():
for positions in observers:
to_save = result[batch_index][name][positions].real
self._result_reweight[name][positions] += multiplicity * to_save * reweight
self._result_reweight_square[name][positions] += multiplicity * to_save * reweight**2
self._result_square_reweight_square[name][positions] += multiplicity * to_save**2 * reweight**2
# for positions in observers:
# to_save = result[batch_index][name][positions].real
# self._result_reweight[name][positions] += multiplicity * to_save * reweight
# self._result_reweight_square[name][positions] += multiplicity * to_save * reweight**2
# self._result_square_reweight_square[name][positions] += multiplicity * to_save**2 * reweight**2
to_save = whole_result[batch_index][name].real
self._whole_result_reweight[name] += multiplicity * to_save * reweight
self._whole_result_reweight_square[name] += multiplicity * to_save * reweight**2
Expand Down

0 comments on commit 8447116

Please sign in to comment.