Преглед изворни кода

minor weight decay initialization fix: now WD is disabled if value < 0 given

Dimitri Korsch пре 5 година
родитељ
комит
598aec0682
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      cvfinetune/finetuner/base.py

+ 1 - 1
cvfinetune/finetuner/base.py

@@ -85,7 +85,7 @@ class _ModelMixin(abc.ABC):
 			decay=0, gradient_clipping=False, **opt_kwargs
 		)
 
-		if opts.decay:
+		if opts.decay > 0:
 			reg_kwargs = {}
 			if opts.l1_loss:
 				reg_cls = Lasso