Skip to content
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

TypeError: list indices must be integers or slices, not numpy.float64 #18

Open
xmuhlw opened this issue Feb 10, 2023 · 0 comments
Open

Comments

@xmuhlw
Copy link

xmuhlw commented Feb 10, 2023

Traceback (most recent call last): File "D:\Desktop\nsganetv21\msunas.py", line 360, in <module> main(cfgs) File "D:\Desktop\nsganetv21\msunas.py", line 315, in main engine.search() File "D:\Desktop\nsganetv21\msunas.py", line 88, in search candidates, c_top1_err_pred = self._next(archive, acc_predictor, self.n_iter) File "D:\Desktop\nsganetv21\msunas.py", line 212, in _next res = minimize( File "E:\anaconda\envs\torch-gpu\lib\site-packages\pymoo\optimize.py", line 67, in minimize res = algorithm.run() File "E:\anaconda\envs\torch-gpu\lib\site-packages\pymoo\core\algorithm.py", line 141, in run self.next() File "E:\anaconda\envs\torch-gpu\lib\site-packages\pymoo\core\algorithm.py", line 161, in next self.evaluator.eval(self.problem, infills, algorithm=self) File "E:\anaconda\envs\torch-gpu\lib\site-packages\pymoo\core\evaluator.py", line 69, in eval self._eval(problem, pop[I], evaluate_values_of, **kwargs) File "E:\anaconda\envs\torch-gpu\lib\site-packages\pymoo\core\evaluator.py", line 90, in _eval out = problem.evaluate(X, return_values_of=evaluate_values_of, return_as_dictionary=True, **kwargs) File "E:\anaconda\envs\torch-gpu\lib\site-packages\pymoo\core\problem.py", line 187, in evaluate _out = self.do(X, return_values_of, *args, **kwargs) File "E:\anaconda\envs\torch-gpu\lib\site-packages\pymoo\core\problem.py", line 229, in do self._evaluate_vectorized(X, out, *args, **kwargs) File "E:\anaconda\envs\torch-gpu\lib\site-packages\pymoo\core\problem.py", line 237, in _evaluate_vectorized self._evaluate(X, out, *args, **kwargs) File "D:\Desktop\nsganetv21\msunas.py", line 279, in _evaluate config = self.ss.decode(_x) File "D:\Desktop\nsganetv21\search_space\ofa.py", line 79, in decode depth.append(self.depth[x[i]]) TypeError: list indices must be integers or slices, not numpy.float64
@vinh-cao , I try to search architectures for cifar10
but I can't solve this problem.
And I notice u help many people to solve the problem, Could you please help? Thanks a lot!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant