File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,6 @@ def train(
4040
4141 # Initialize model
4242 model = Darknet (cfg , img_size ).to (device )
43- # for m in model.modules():
44- # weights_init_normal(m) # set weight distributions
4543
4644 # Optimizer
4745 lr0 = 0.001 # initial learning rate
@@ -56,7 +54,7 @@ def train(
5654 if resume : # Load previously saved model
5755 if transfer : # Transfer learning
5856 chkpt = torch .load (weights + 'yolov3.pt' , map_location = device )
59- model .load_state_dict ({k : v for k , v in chkpt ['model' ].items () if v .numel () > 1 and v .shape [0 ] != nf },
57+ model .load_state_dict ({k : v for k , v in chkpt ['model' ].items () if v .numel () > 1 and v .shape [0 ] != 255 },
6058 strict = False )
6159 for p in model .parameters ():
6260 p .requires_grad = True if p .shape [0 ] == nf else False
You can’t perform that action at this time.
0 commit comments