Distill: add feature map

This commit is contained in:
Akemi Izuko 2024-11-23 23:42:14 -07:00
parent 9196532b6a
commit bca9d0b8e5
Signed by: akemi
GPG key ID: 8DE0764E1809E9FC
2 changed files with 3 additions and 1 deletions

View file

@ -132,10 +132,11 @@ class ResNetBagOfTricks(nn.Module):
x = self.conv6(x)
x = self.conv7(x)
x = x + self.conv9(self.conv8(x))
feature_map = x
x = self.pool10(x)
x = x.reshape(x.size(0), x.size(1))
x = self.linear11(x)
x = self.scale_out * x
return x
return x, feature_map
Model = ResNetBagOfTricks

View file

@ -1,3 +1,4 @@
import torch
import torch.nn as nn