Giter Club home page Giter Club logo

custom-dqn-rl-with-unity-ml-agents's People

Contributors

jannesdoege avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

custom-dqn-rl-with-unity-ml-agents's Issues

Training error

Hello, Nice work! I got this issue. How to resolve this problem?

8879 frames done 71 games, reward -94.91428571428571 eps 0.82242 loss: None
8939 frames done 72 games, reward -95.0 eps 0.8212200000000001 loss: None
8973 frames done 73 games, reward -95.08333333333333 eps 0.82054 loss: None
9113 frames done 74 games, reward -95.15068493150685 eps 0.81774 loss: None
9155 frames done 75 games, reward -95.24324324324324 eps 0.8169 loss: None
9240 frames done 76 games, reward -95.30666666666667 eps 0.8152 loss: None
9310 frames done 77 games, reward -95.38157894736842 eps 0.8138 loss: None
9331 frames done 78 games, reward -95.45454545454545 eps 0.81338 loss: None
9362 frames done 79 games, reward -95.51282051282051 eps 0.81276 loss: None
9412 frames done 80 games, reward -95.56962025316456 eps 0.81176 loss: None
9469 frames done 81 games, reward -95.6375 eps 0.81062 loss: None
9477 frames done 82 games, reward -95.70370370370371 eps 0.81046 loss: None
9553 frames done 83 games, reward -95.7560975609756 eps 0.80894 loss: None
9645 frames done 84 games, reward -95.81927710843374 eps 0.8071 loss: None
9758 frames done 85 games, reward -95.88095238095238 eps 0.80484 loss: None
9798 frames done 86 games, reward -95.95294117647059 eps 0.80404 loss: None
Traceback (most recent call last):
File "d:\CodingAI\custom-DQN-RL-with-unity-ml-agents\unity_project\python\train.py", line 128, in
main()
File "d:\CodingAI\custom-DQN-RL-with-unity-ml-agents\unity_project\python\train.py", line 93, in main
loss = DQN_agent.step(Experience(state_v, action, reward, done, new_state))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\CodingAI\custom-DQN-RL-with-unity-ml-agents\unity_project\python\agent.py", line 40, in step
return self.learn()
^^^^^^^^^^^^
File "d:\CodingAI\custom-DQN-RL-with-unity-ml-agents\unity_project\python\agent.py", line 52, in learn
loss_v = self.calc_loss()
^^^^^^^^^^^^^^^^
File "d:\CodingAI\custom-DQN-RL-with-unity-ml-agents\unity_project\python\agent.py", line 68, in calc_loss
states, actions, rewards, dones, next_states = self.rep_buffer.sample(batch_size=self.batch_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\CodingAI\custom-DQN-RL-with-unity-ml-agents\unity_project\python\buffer.py", line 20, in sample
return np.array(states), np.array(actions, dtype=np.float32),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\CodingAI.venv\Lib\site-packages\torch_tensor.py", line 1032, in array
return self.numpy().astype(dtype, copy=False)
^^^^^^^^^^^^
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.