Explorar o código

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

Dimitri Korsch %!s(int64=6) %!d(string=hai) anos
pai
achega
598aec0682
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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