파티클의 전역 최적값이 이전 회차와 동일할 때 점진적으로 가중치의 감소, 다를 때 순간적으로 두배의 관성치를 주는 방식을 추가
This commit is contained in:
jung-geun
2023-07-26 23:26:39 +09:00
parent 7b81b40faf
commit ab937ac71c
4 changed files with 29 additions and 17 deletions

View File

@@ -106,15 +106,15 @@ loss = [
pso_mnist = Optimizer(
model,
loss=loss[0],
n_particles=1000,
c0=0.4,
c1=0.6,
w_min=0.5,
w_max=0.8,
n_particles=500,
c0=0.3,
c1=0.5,
w_min=0.4,
w_max=0.9,
negative_swarm=0.1,
mutation_swarm=0.2,
particle_min=-5,
particle_max=5,
mutation_swarm=0.3,
particle_min=-4,
particle_max=4,
)
best_score = pso_mnist.fit(