Skip to content

Commit

Permalink
_print_weights()
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Jun 9, 2020
1 parent 5bee686 commit 854ccb9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions models/yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 854ccb9

Please sign in to comment.