You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe what you were trying to get done.
Run a GlobalBestOptimization
Tell us what happened, what went wrong, and what you expected to happen.
I have a fairly complex objective function, but I can get it to run and return the expected values when running outside of pyswarms. but when I kick off an optimization i get this 'bool' object is not subsriptable TypeError after what appears to be the 1st iteration of the optimization (or maybe it's at the beginning of the 2nd iteration).
I wonder what shape your custom objective function returns. As of now, custom functions should
always return a vector of shape (n_particles, ) where each element contains the fitness of each particle.
In order to interface properly with pyswarms, the objective function should:
Be able to take a matrix of shape (n_particles, n_dimensions)
Be able to return a vector of shape (n_particles, ) with the fitness for each particle.
Description
Describe what you were trying to get done.
Run a GlobalBestOptimization
Tell us what happened, what went wrong, and what you expected to happen.
I have a fairly complex objective function, but I can get it to run and return the expected values when running outside of pyswarms. but when I kick off an optimization i get this 'bool' object is not subsriptable TypeError after what appears to be the 1st iteration of the optimization (or maybe it's at the beginning of the 2nd iteration).
What I Did
Then running the optimizer results in the following output and traceback:
The text was updated successfully, but these errors were encountered: