-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with problem.make_net
Shape Compatibility
#110
Comments
engintoklu
added a commit
that referenced
this issue
Jul 30, 2024
Addressed issue: #110 During the initialization of CMAES, the center point of the search was generated not as a vector of length `n`, but as a tensor of shape `(1, n)`. Because of this, the reported "center" solution in the status dictionary also ended up with an unexpected leftmost dimension with size 1. This fix introduces a `squeeze()` operation on the initial center tensor, and also a shape verification, ensuring that the center tensor is 1-dimensional and has a correct length. With these changes, the reported "center" in the status dictionary becomes 1-dimensional.
flukeskywalker
pushed a commit
that referenced
this issue
Aug 2, 2024
Addressed issue: #110 During the initialization of CMAES, the center point of the search was generated not as a vector of length `n`, but as a tensor of shape `(1, n)`. Because of this, the reported "center" solution in the status dictionary also ended up with an unexpected leftmost dimension with size 1. This fix introduces a `squeeze()` operation on the initial center tensor, and also a shape verification, ensuring that the center tensor is 1-dimensional and has a correct length. With these changes, the reported "center" in the status dictionary becomes 1-dimensional.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
I am experiencing an issue with the
problem.make_net
method. When I try to generate a trained network using thecenter
parameter from thesearcher.status
, the method fails unless I manually callsqueeze()
on thecenter
parameter.Details:
Code to Reproduce:
Issue:
The code above raises an error when trying to generate a trained network using
problem.make_net(searcher.status["center"])
. However, if I modify the last line to:it works without any issues.
Expected Behavior:
problem.make_net
should handle the shape of thecenter
parameter directly without needing to callsqueeze()
.The text was updated successfully, but these errors were encountered: