x-evolution 0.1.16__tar.gz → 0.1.17__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.16 → x_evolution-0.1.17}/PKG-INFO +1 -1
- {x_evolution-0.1.16 → x_evolution-0.1.17}/pyproject.toml +1 -1
- {x_evolution-0.1.16 → x_evolution-0.1.17}/x_evolution/x_evolution.py +5 -3
- {x_evolution-0.1.16 → x_evolution-0.1.17}/.github/workflows/python-publish.yml +0 -0
- {x_evolution-0.1.16 → x_evolution-0.1.17}/.github/workflows/test.yml +0 -0
- {x_evolution-0.1.16 → x_evolution-0.1.17}/.gitignore +0 -0
- {x_evolution-0.1.16 → x_evolution-0.1.17}/LICENSE +0 -0
- {x_evolution-0.1.16 → x_evolution-0.1.17}/README.md +0 -0
- {x_evolution-0.1.16 → x_evolution-0.1.17}/tests/test_evolution.py +0 -0
- {x_evolution-0.1.16 → x_evolution-0.1.17}/train_lunar.py +0 -0
- {x_evolution-0.1.16 → x_evolution-0.1.17}/train_mnist.py +0 -0
- {x_evolution-0.1.16 → x_evolution-0.1.17}/train_xor.py +0 -0
- {x_evolution-0.1.16 → x_evolution-0.1.17}/x_evolution/__init__.py +0 -0
|
@@ -6,7 +6,7 @@ from pathlib import Path
|
|
|
6
6
|
from functools import partial
|
|
7
7
|
|
|
8
8
|
import torch
|
|
9
|
-
from torch import tensor, Tensor, is_tensor, arange, randint
|
|
9
|
+
from torch import tensor, Tensor, stack, is_tensor, arange, randint
|
|
10
10
|
from torch.nn import Module, ModuleList, Parameter, ParameterList
|
|
11
11
|
from torch.optim import SGD, Adam, Optimizer
|
|
12
12
|
from torch.optim.lr_scheduler import LRScheduler
|
|
@@ -367,8 +367,10 @@ class EvoStrategy(Module):
|
|
|
367
367
|
filename = 'evolved.model',
|
|
368
368
|
num_generations = None,
|
|
369
369
|
disable_distributed = False,
|
|
370
|
-
rollback_model_at_end = False
|
|
370
|
+
rollback_model_at_end = False,
|
|
371
|
+
verbose = None
|
|
371
372
|
):
|
|
373
|
+
verbose = default(verbose, self.verbose)
|
|
372
374
|
|
|
373
375
|
model = self.noisable_model.to(self.device)
|
|
374
376
|
|
|
@@ -553,4 +555,4 @@ class EvoStrategy(Module):
|
|
|
553
555
|
# return fitnesses across generations
|
|
554
556
|
# for meta-evolutionary (nesting EvoStrategy within the environment of another and optimizing some meta-network)
|
|
555
557
|
|
|
556
|
-
return fitnesses_across_generations
|
|
558
|
+
return stack(fitnesses_across_generations)
|
|
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
|
|
File without changes
|