Commit
·
854ccb9
1
Parent(s):
5bee686
_print_weights()
Browse files- models/yolo.py +5 -0
models/yolo.py
CHANGED
@@ -125,6 +125,11 @@ class Model(nn.Module):
|
|
125 |
b = self.model[f].bias.detach().view(m.na, -1).T # conv.bias(255) to (3,85)
|
126 |
print(('%g Conv2d.bias:' + '%10.3g' * 6) % (f, *b[:5].mean(1).tolist(), b[5:].mean()))
|
127 |
|
|
|
|
|
|
|
|
|
|
|
128 |
def fuse(self): # fuse model Conv2d() + BatchNorm2d() layers
|
129 |
print('Fusing layers...')
|
130 |
for m in self.model.modules():
|
|
|
125 |
b = self.model[f].bias.detach().view(m.na, -1).T # conv.bias(255) to (3,85)
|
126 |
print(('%g Conv2d.bias:' + '%10.3g' * 6) % (f, *b[:5].mean(1).tolist(), b[5:].mean()))
|
127 |
|
128 |
+
# def _print_weights(self):
|
129 |
+
# for m in self.model.modules():
|
130 |
+
# if type(m) is Bottleneck:
|
131 |
+
# print('%10.3g' % (m.w.detach().sigmoid() * 2)) # shortcut weights
|
132 |
+
|
133 |
def fuse(self): # fuse model Conv2d() + BatchNorm2d() layers
|
134 |
print('Fusing layers...')
|
135 |
for m in self.model.modules():
|