ardamavi / Game-Bot

Artificial intelligence learn playing any game with watching you.
Apache License 2.0
450 stars 117 forks source link

Traceback (most recent call last): File "C:\Users\OneDrive\Desktop\Game-Bot-master\Game-Bot-master\train.py", line 4, in <module> from get_dataset import get_dataset File "C:\Users\OneDrive\Desktop\Game-Bot-master\Game-Bot-master\get_dataset.py", line 4, in <module> from keras.utils import to_categorical ImportError: cannot import name 'to_categorical' from 'keras.utils' (C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\keras\utils\__init__.py) ------------------ (program exited with code: 1) Press any key to continue . . . #37

Open cubestudioss opened 2 years ago

cubestudioss commented 2 years ago

Traceback (most recent call last): File "C:\Users\OneDrive\Desktop\Game-Bot-master\Game-Bot-master\train.py", line 4, in from get_dataset import get_dataset File "C:\Users\OneDrive\Desktop\Game-Bot-master\Game-Bot-master\get_dataset.py", line 4, in from keras.utils import to_categorical ImportError: cannot import name 'to_categorical' from 'keras.utils' (C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\keras\utils__init__.py) ------------------ (program exited with code: 1) Press any key to continue . . .

Can any one help

px1club commented 2 years ago

replace that line with "from tensorflow.keras.utils import to_categorical"