We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39a6c30 commit 748821eCopy full SHA for 748821e
timm/models/rdnet.py
@@ -318,8 +318,11 @@ def forward_intermediates(
318
feat_idx += 1
319
x = stage(x)
320
if feat_idx in take_indices:
321
- # NOTE not bothering to apply norm_pre when norm=True as almost no models have it enabled
322
- intermediates.append(x)
+ if norm and feat_idx == last_idx:
+ x_inter = self.norm_pre(x) # applying final norm to last intermediate
323
+ else:
324
+ x_inter = x
325
+ intermediates.append(x_inter)
326
327
if intermediates_only:
328
return intermediates
0 commit comments