Distill: add feature map
This commit is contained in:
parent
9196532b6a
commit
bca9d0b8e5
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import torch
|
||||
import torch.nn as nn
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue