nnaisense / evotorch

Advanced evolutionary computation library built directly on top of PyTorch, created at NNAISENSE.
https://evotorch.ai
Apache License 2.0
1.01k stars 63 forks source link

CMAES._get_sigma assumes sigma to be a singleton #101

Closed famura closed 4 months ago

famura commented 8 months ago

I suspect this to be a bug, however, did not spend much time with your CMAES implementation.

This line tries to cast self.sigma to a building float. I think that for multidim problems this could be a vector (torch.Tensor). At least during initialization, it is a tensor.

If I am correct, the float(...) could be turned into a self.sigma.to(device="cpu", dtype=torch.float)

Thanks for looking at this, Fabio

flukeskywalker commented 4 months ago

Resovled in #103