This commit is contained in:
Glenn Jocher 2019-08-24 21:50:33 +02:00
parent 70be0d5d14
commit 3ee457cd3d
1 changed files with 4 additions and 4 deletions

View File

@ -555,12 +555,12 @@ def get_yolo_layers(model):
def print_model_biases(model):
# prints the bias neurons preceding each yolo layer
print('\nModel output-bias Summary:')
print('\nModel Bias Summary (per output layer):')
for l in model.yolo_layers: # print pretrained biases
b = model.module_list[l - 1][0].bias.view(3, -1) # bias 3x85
print('regression: %.2f+/-%.2f, ' % (b[:, :4].mean(), b[:, :4].std()),
'objectness: %.2f+/-%.2f, ' % (b[:, 4].mean(), b[:, 4].std()),
'classification: %.2f+/-%.2f' % (b[:, 5:].mean(), b[:, 5:].std()))
print('regression: %5.2f+/-%-5.2f ' % (b[:, :4].mean(), b[:, :4].std()),
'objectness: %5.2f+/-%-5.2f ' % (b[:, 4].mean(), b[:, 4].std()),
'classification: %5.2f+/-%-5.2f' % (b[:, 5:].mean(), b[:, 5:].std()))
def strip_optimizer(f='weights/last.pt'): # from utils.utils import *; strip_optimizer()