mirror of
https://github.com/jung-geun/PSO.git
synced 2025-12-20 04:50:45 +09:00
23-07-26
파티클의 전역 최적값이 이전 회차와 동일할 때 점진적으로 가중치의 감소, 다를 때 순간적으로 두배의 관성치를 주는 방식을 추가
This commit is contained in:
16
mnist.py
16
mnist.py
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user