Correct convergence test
This commit is contained in:
@@ -617,7 +617,7 @@ class background():
|
|||||||
new_loss = 1000000
|
new_loss = 1000000
|
||||||
k = 0
|
k = 0
|
||||||
|
|
||||||
while (np.abs(old_loss - new_loss) > 1e-3) and (k < n_epochs):
|
while (old_loss - new_loss > 1e-3) and (k < n_epochs):
|
||||||
# Compute A = Y - B by filling the nans with 0s
|
# Compute A = Y - B by filling the nans with 0s
|
||||||
A = np.where(np.isnan(Y_r - b_tmp) == True, 0.0, Y_r - b_tmp)
|
A = np.where(np.isnan(Y_r - b_tmp) == True, 0.0, Y_r - b_tmp)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user