Skip to content

Commit 212f1b5

Browse files
committed
fixed bug
1 parent f6c054f commit 212f1b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

finetune.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ def forward(self, x):
6565
for layer, (name, module) in enumerate(self.model.features._modules.items()):
6666
x = module(x)
6767
if isinstance(module, torch.nn.modules.conv.Conv2d):
68-
x.register_hook(self.compute_rank)
69-
self.activations.append(self.compute_rank(activation_index))
68+
x.register_hook(self.compute_rank(activation_index))
69+
self.activations.append(x)
7070
self.activation_to_layer[activation_index] = layer
7171
activation_index += 1
7272

0 commit comments

Comments
 (0)