From 4ce6305f771e5d0d744e7090b0c2a8025aef4e45 Mon Sep 17 00:00:00 2001 From: Thomas George Date: Sat, 3 Feb 2024 09:55:24 +0100 Subject: [PATCH] removes useless print in test --- nngeometry/generator/jacobian/grads.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/nngeometry/generator/jacobian/grads.py b/nngeometry/generator/jacobian/grads.py index b7372c0..5d73ebf 100644 --- a/nngeometry/generator/jacobian/grads.py +++ b/nngeometry/generator/jacobian/grads.py @@ -319,8 +319,6 @@ def flat_grad(cls, buffer, mod, layer, x, gy): norm2 = (mod.weight**2).sum(dim=(1, 2, 3), keepdim=True) + mod.eps gw = gw_prime / torch.sqrt(norm2).unsqueeze(0) - # print((gw_prime * mod.weight.unsqueeze(0)).sum(dim=(2,3,4), keepdim=True).size()) - # print((mod.weight * norm2**(-1.5)).unsqueeze(0).size()) gw -= (gw_prime * mod.weight.unsqueeze(0)).sum(dim=(2, 3, 4), keepdim=True) * ( mod.weight * norm2 ** (-1.5)