removed xy/wh loss reporting
This commit is contained in:
+15
-8
@@ -562,20 +562,27 @@ def print_model_biases(model):
|
||||
'classification: %.2f+/-%.2f' % (b[:, 5:].mean(), b[:, 5:].std()))
|
||||
|
||||
|
||||
def strip_optimizer(f='weights/best.pt'): # from utils.utils import *; strip_optimizer()
|
||||
def strip_optimizer(f='weights/last.pt'): # from utils.utils import *; strip_optimizer()
|
||||
# Strip optimizer from *.pt files for lighter files (reduced by 2/3 size)
|
||||
x = torch.load(f)
|
||||
x['optimizer'] = None
|
||||
# x['training_results'] = None
|
||||
# x['epoch'] = -1
|
||||
# for p in x['model'].values():
|
||||
# try:
|
||||
# p.requires_grad = True
|
||||
# except:
|
||||
# pass
|
||||
torch.save(x, f)
|
||||
|
||||
|
||||
def create_backbone(f='weights/last.pt'): # from utils.utils import *; create_backbone()
|
||||
# create a backbone from a *.pt file
|
||||
x = torch.load(f)
|
||||
x['optimizer'] = None
|
||||
x['training_results'] = None
|
||||
x['epoch'] = -1
|
||||
for p in x['model'].values():
|
||||
try:
|
||||
p.requires_grad = True
|
||||
except:
|
||||
pass
|
||||
torch.save(x, 'weights/backbone.pt')
|
||||
|
||||
|
||||
def coco_class_count(path='../coco/labels/train2014/'):
|
||||
# Histogram of occurrences per class
|
||||
nc = 80 # number classes
|
||||
|
||||
Reference in New Issue
Block a user