chore: 패키지 요구사항 업데이트 반영

This commit is contained in:
pieroot.02@gmail.com
2024-05-17 01:41:37 +09:00
parent 737baf6681
commit 0883bbe1b6

View File

@@ -293,9 +293,8 @@ class Particle:
* r_0 * r_0
* (self.best_weights - self.weights) * (self.best_weights - self.weights)
+ global_rate + global_rate
* Particle.g_best_score[1] # * Particle.g_best_score[1]
* r_1 * r_1 * (best_particle_weights - self.weights)
* (best_particle_weights - self.weights)
) )
if self.mutation != 0.0 and rng.random() < self.mutation: if self.mutation != 0.0 and rng.random() < self.mutation:
@@ -310,9 +309,9 @@ class Particle:
""" """
가중치 업데이트 가중치 업데이트
""" """
new_w = np.add(self.weights, self.velocities) self.weights = np.add(self.weights, self.velocities)
self.model.set_weights(self._decode(new_w)) self.model.set_weights(self.get_weights())
def step(self, x, y, local_rate, global_rate, w, renewal: str = "acc"): def step(self, x, y, local_rate, global_rate, w, renewal: str = "acc"):
""" """