mirror of
https://github.com/jung-geun/PSO.git
synced 2025-12-20 04:50:45 +09:00
23-06-28
단순 업데이트
This commit is contained in:
@@ -114,6 +114,8 @@ class Particle:
|
||||
self.best_score = score[1]
|
||||
self.best_weights = self.model.get_weights()
|
||||
elif renewal == "loss":
|
||||
if score[0] == 'nan':
|
||||
score[0] = np.inf
|
||||
if score[0] < self.best_score:
|
||||
self.best_score = score[0]
|
||||
self.best_weights = self.model.get_weights()
|
||||
|
||||
Reference in New Issue
Block a user