Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
irenaby committed Oct 22, 2024
1 parent 1e1e223 commit 89837b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def _compute_per_tensor(self, output, target_activation_tensors):
for _ in range(len(target_activation_tensors))]
prev_mean_results = None
for j in tqdm(range(self.num_iterations_for_approximation), "Hessian random iterations"): # Approximation iterations
# Getting a random vector with normal distribution
# Getting a random vector
v = self._generate_random_vectors_batch(output.shape, output.device)
f_v = torch.sum(v * output)
for i, ipt_tensor in enumerate(target_activation_tensors): # Per Interest point activation tensor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def compute(self) -> List[np.ndarray]:

prev_mean_results = None
for j in tqdm(range(self.num_iterations_for_approximation)):
# Getting a random vector with normal distribution and the same shape as the model output
# Getting a random vector with the same shape as the model output
v = self._generate_random_vectors_batch(output_tensor.shape, device=device)
f_v = torch.mean(torch.sum(v * output_tensor, dim=-1))
for i, ipt_node in enumerate(self.hessian_request.target_nodes): # Per Interest point weights tensor
Expand Down

0 comments on commit 89837b0

Please sign in to comment.