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

Problem with action_encoder #2

Open
albert88as opened this issue Apr 11, 2021 · 0 comments
Open

Problem with action_encoder #2

albert88as opened this issue Apr 11, 2021 · 0 comments

Comments

@albert88as
Copy link

Hi Haryoa,
Im learning about reinforcement learning and very interested to your project. But i cant run this project in my computer. This faces with enconde error that

2021-04-11 16:22:22.072479: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
D:\ana3\envs\cudatk\lib\site-packages\sklearn\utils\validation.py:70: FutureWarning: Pass categories=2998 as keyword args. From version 1.0 (renaming of 0.25) passing these as positional arguments will result in an error
  warnings.warn(f"Pass {args_msg} as keyword args. From version "
list_all_action 
 [[   0]
 [2674]
 [2676]
 ...
 [2646]
 [2665]
 [2997]]
Traceback (most recent call last):
  File "main.py", line 118, in <module>
    main_alpha_zero_train()
  File "main.py", line 41, in main_alpha_zero_train
    ae.fit(list_all_action=all_action_spaces)
  File "D:\88Projects\AlphaZero\evo-pawness\reinforcement_learning_train\util\action_encoder.py", line 29, in fit
    self.onehot_encoder.fit(list_all_action)
  File "D:\ana3\envs\cudatk\lib\site-packages\sklearn\preprocessing\_encoders.py", line 417, in fit
    self._fit(X, handle_unknown=self.handle_unknown,
  File "D:\ana3\envs\cudatk\lib\site-packages\sklearn\preprocessing\_encoders.py", line 81, in _fit
    if len(self.categories) != n_features:
TypeError: object of type 'int' has no len()

can you help me to solve this problem.
Thank you!
Albert

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