updates
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
2e6ac2228a
commit
abbf8de12f
|
@ -556,8 +556,12 @@ def get_yolo_layers(model):
|
||||||
def print_model_biases(model):
|
def print_model_biases(model):
|
||||||
# prints the bias neurons preceding each yolo layer
|
# prints the bias neurons preceding each yolo layer
|
||||||
print('\nModel Bias Summary (per output layer):')
|
print('\nModel Bias Summary (per output layer):')
|
||||||
|
multi_gpu = type(model) in (nn.parallel.DataParallel, nn.parallel.DistributedDataParallel)
|
||||||
for l in model.yolo_layers: # print pretrained biases
|
for l in model.yolo_layers: # print pretrained biases
|
||||||
b = model.module_list[l - 1][0].bias.view(3, -1) # bias 3x85
|
if multi_gpu:
|
||||||
|
b = model.module.module_list[l - 1][0].bias.view(3, -1) # bias 3x85
|
||||||
|
else:
|
||||||
|
b = model.module_list[l - 1][0].bias.view(3, -1) # bias 3x85
|
||||||
print('regression: %5.2f+/-%-5.2f ' % (b[:, :4].mean(), b[:, :4].std()),
|
print('regression: %5.2f+/-%-5.2f ' % (b[:, :4].mean(), b[:, :4].std()),
|
||||||
'objectness: %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()))
|
'classification: %5.2f+/-%-5.2f' % (b[:, 5:].mean(), b[:, 5:].std()))
|
||||||
|
|
Loading…
Reference in New Issue