File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
pytorch_optimizer/optimizer Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ def step(self, closure: CLOSURE = None) -> LOSS:
125125 exp_avg_sq_hat_sum += exp_avg_sq .sum () / bias_correction2
126126
127127 if param_size == 0 :
128- raise ZeroDivisionError ('[-] param_size is 0' )
128+ raise ValueError ('[-] param_size is 0' )
129129
130130 exp_avg_sq_hat_mean = exp_avg_sq_hat_sum / param_size
131131
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ def step(self, closure: CLOSURE = None) -> LOSS:
236236
237237 # stable weight decay
238238 if param_size == 0 :
239- raise ZeroDivisionError ('[-] param_size is 0' )
239+ raise ValueError ('[-] param_size is 0' )
240240
241241 variance_normalized = math .sqrt (variance_ma_sum / param_size )
242242 if math .isnan (variance_normalized ):
You can’t perform that action at this time.
0 commit comments