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

Overflow error #76

Closed sstroobants closed 1 year ago

sstroobants commented 1 year ago

https://github.com/nnaisense/evotorch/blame/9d31d59cfcace0c99de59bf59bfbc7ceb55ae11f/src/evotorch/algorithms/cmaes.py#L365 This line results in an overflow error for me. The floor results to zero, thus division by zero. shouldn't this line be: int(np.floor(1 / (10 * d * (self.c_1.cpu() + self.c_mu.cpu()))))

engintoklu commented 1 year ago

Hi @sstroobants ! Thank you for your very useful feedback, and sorry for my very late reaction! Hopefully this fixes the issue: https://github.com/nnaisense/evotorch/pull/86