x-evolution 0.1.14__tar.gz → 0.1.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {x_evolution-0.1.14 → x_evolution-0.1.15}/PKG-INFO +1 -1
- {x_evolution-0.1.14 → x_evolution-0.1.15}/pyproject.toml +1 -1
- {x_evolution-0.1.14 → x_evolution-0.1.15}/train_lunar.py +6 -1
- {x_evolution-0.1.14 → x_evolution-0.1.15}/x_evolution/x_evolution.py +1 -1
- {x_evolution-0.1.14 → x_evolution-0.1.15}/.github/workflows/python-publish.yml +0 -0
- {x_evolution-0.1.14 → x_evolution-0.1.15}/.github/workflows/test.yml +0 -0
- {x_evolution-0.1.14 → x_evolution-0.1.15}/.gitignore +0 -0
- {x_evolution-0.1.14 → x_evolution-0.1.15}/LICENSE +0 -0
- {x_evolution-0.1.14 → x_evolution-0.1.15}/README.md +0 -0
- {x_evolution-0.1.14 → x_evolution-0.1.15}/tests/test_evolution.py +0 -0
- {x_evolution-0.1.14 → x_evolution-0.1.15}/train_mnist.py +0 -0
- {x_evolution-0.1.14 → x_evolution-0.1.15}/train_xor.py +0 -0
- {x_evolution-0.1.14 → x_evolution-0.1.15}/x_evolution/__init__.py +0 -0
|
@@ -80,6 +80,8 @@ from x_mlps_pytorch.residual_normed_mlp import ResidualNormedMLP
|
|
|
80
80
|
|
|
81
81
|
actor = ResidualNormedMLP(dim_in = 8, dim = 24, depth = 2, residual_every = 1, dim_out = 4)
|
|
82
82
|
|
|
83
|
+
from torch.optim.lr_scheduler import CosineAnnealingLR
|
|
84
|
+
|
|
83
85
|
evo_strat = EvoStrategy(
|
|
84
86
|
actor,
|
|
85
87
|
environment = LunarEnvironment(repeats = 2),
|
|
@@ -91,7 +93,10 @@ evo_strat = EvoStrategy(
|
|
|
91
93
|
learned_noise_scale = True,
|
|
92
94
|
use_sigma_optimizer = True,
|
|
93
95
|
learning_rate = 1e-3,
|
|
94
|
-
noise_scale_learning_rate = 1e-4
|
|
96
|
+
noise_scale_learning_rate = 1e-4,
|
|
97
|
+
use_scheduler = True,
|
|
98
|
+
scheduler_klass = CosineAnnealingLR,
|
|
99
|
+
scheduler_kwargs = dict(T_max = 50_000)
|
|
95
100
|
)
|
|
96
101
|
|
|
97
102
|
evo_strat()
|
|
@@ -515,7 +515,7 @@ class EvoStrategy(Module):
|
|
|
515
515
|
if self.learned_noise_scale:
|
|
516
516
|
packed_sigma, _ = pack(list(self.sigmas), '*')
|
|
517
517
|
avg_sigma = packed_sigma.mean().item()
|
|
518
|
-
msg += f' |
|
|
518
|
+
msg += f' | average sigma: {avg_sigma:.3f}'
|
|
519
519
|
|
|
520
520
|
self.print(msg)
|
|
521
521
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|