detailed image sizes report

This commit is contained in:
Glenn Jocher
2020-04-14 11:51:19 -07:00
parent 029e137bc2
commit 763cdd5ae2
2 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -573,9 +573,9 @@ def get_yolo_layers(model):
def print_model_biases(model):
# prints the bias neurons preceding each yolo layer
print('\nModel Bias Summary: %8s%18s%18s%18s' % ('layer', 'regression', 'objectness', 'classification'))
multi_gpu = type(model) in (nn.parallel.DataParallel, nn.parallel.DistributedDataParallel)
for l in model.yolo_layers: # print pretrained biases
try:
try:
multi_gpu = type(model) in (nn.parallel.DataParallel, nn.parallel.DistributedDataParallel)
for l in model.yolo_layers: # print pretrained biases
if multi_gpu:
na = model.module.module_list[l].na # number of anchors
b = model.module.module_list[l - 1][0].bias.view(na, -1) # bias 3x85