From 854ccb9a74be69b1be69a60074d423f7f9d6d4ce Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 9 Jun 2020 10:51:47 -0700 Subject: [PATCH] _print_weights() --- models/yolo.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/models/yolo.py b/models/yolo.py index 69d2f15a9223..a3e9475e9214 100644 --- a/models/yolo.py +++ b/models/yolo.py @@ -125,6 +125,11 @@ def _print_biases(self): b = self.model[f].bias.detach().view(m.na, -1).T # conv.bias(255) to (3,85) print(('%g Conv2d.bias:' + '%10.3g' * 6) % (f, *b[:5].mean(1).tolist(), b[5:].mean())) + # def _print_weights(self): + # for m in self.model.modules(): + # if type(m) is Bottleneck: + # print('%10.3g' % (m.w.detach().sigmoid() * 2)) # shortcut weights + def fuse(self): # fuse model Conv2d() + BatchNorm2d() layers print('Fusing layers...') for m in self.model.modules():