-
Notifications
You must be signed in to change notification settings - Fork 409
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
cpu to gpu #7
Comments
+1 |
You might like to take a look at this... |
All you have to do is in the agent.py place the following code right after the model init:
|
Alright I figured out the solution. Changes to agent.py Add the below right after line "self.model..." Modify def get_action, in the else (add .to('cuda:0') Changes to model.py...
add the below just after line "self.model = model" def train_setup needs to have these changes.
|
Yay! |
Or you can do for agent.py:
|
Hi guys, thx for the help i did it and it works, BUT on my PC with AMD 7950X3D and Nvidia 4090 |
Sometimes GPUs are meant for graphics strictly, which may hinder them in terms of multiprocessing and calculating each action the neurons will take, it is a fairly uncommon issue. |
Yea, but that's THE best PC GPU right now although CPU is top too. Any other cases to process AI is like 100-1000x faster with GPU, for example LLM inferences. Im still think that there is some issue in the code. |
If you could show the code, I could probably help optimize it. |
Additionally, it would probably be better to train the AI in a headless environment. |
It has been implemented with cpu, I want to implement this project with gpu, how should I do it, please advise
The text was updated successfully, but these errors were encountered: