Skip to content

Commit

Permalink
Remove self cache
Browse files Browse the repository at this point in the history
  • Loading branch information
pomonam committed Jul 9, 2024
1 parent 6645ca9 commit 9744252
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kronfluence/module/tracker/pairwise_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def backward_hook(output_gradient: torch.Tensor) -> None:
input_activation=cached_activation.to(device=output_gradient.device),
output_gradient=output_gradient,
)
del self.cached_activations, cached_activation, output_gradient
del cached_activation, output_gradient
self.clear_all_cache()
else:
per_sample_gradient = self.module.compute_per_sample_gradient(
Expand Down

0 comments on commit 9744252

Please sign in to comment.