From 3a4ed8b3aba7e957f32b4b51bca28215c9792000 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 20 Nov 2019 13:40:24 -0800 Subject: [PATCH] updates --- train.py | 2 +- utils/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index 1b1975e0..bb9562f3 100644 --- a/train.py +++ b/train.py @@ -412,7 +412,7 @@ if __name__ == '__main__': parser.add_argument('--bucket', type=str, default='', help='gsutil bucket') parser.add_argument('--img-weights', action='store_true', help='select training images by weight') parser.add_argument('--cache-images', action='store_true', help='cache images for faster training') - parser.add_argument('--weights', type=str, default='', help='initial weights') + parser.add_argument('--weights', type=str, default='weights/ultralytics49.pt', help='initial weights') parser.add_argument('--arc', type=str, default='default', help='yolo architecture') # defaultpw, uCE, uBCE parser.add_argument('--prebias', action='store_true', help='transfer-learn yolo biases prior to training') parser.add_argument('--name', default='', help='renames results.txt to results_name.txt if supplied') diff --git a/utils/utils.py b/utils/utils.py index b7a9d8c5..89792ac3 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -44,7 +44,7 @@ def load_classes(path): def labels_to_class_weights(labels, nc=80): # Get class weights (inverse frequency) from training labels if labels[0] is None: # no labels loaded - return None + return torch.Tensor() labels = np.concatenate(labels, 0) # labels.shape = (866643, 5) for COCO classes = labels[:, 0].astype(np.int) # labels = [class xywh]