DQN is a multi-layered neural network, added target network and experience replay to Q-learning
Questions tagged [dqn]
206 questions
16
votes
7 answers
PyTorch Model Training: RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR
After training a PyTorch model on a GPU for several hours, the program fails with the error
RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR
Training Conditions
Neural Network: PyTorch 4-layer nn.LSTM with nn.Linear output
Deep Q Network…

Athena Wisdom
- 6,101
- 9
- 36
- 60
4
votes
0 answers
How to extract weights of DQN agent in TF-Agents framework?
I am using TF-Agents for a custom reinforcement learning problem, where I train a DQN (constructed using DqnAgents from the TF-Agents framework) on some features from my custom environment, and separately use a keras convolutional model to extract…

Tarun Sriram
- 41
- 1
4
votes
0 answers
how to get the dimension of Openai gym spaces.Tuple to be used in DQN when building neural network with Keras
I built a cumstom environment with Openai Gym spaces.Tuple because my observation is made up of: hour(0-23), day(1-7), month(1-12), which are discrete; four continuous numbers, which are from a csv file; and an array of shape (4*24), which are also…

Yuchen
- 81
- 5
4
votes
1 answer
How to continue the DQN or DDPG training after previous training is interrupted? D
When doing reinforcement learning, I have to start training from the beginning each time. It costs lots of time. Is there any solution on starting training from the previous training results? Thanks.

seabiscuit
- 41
- 1
3
votes
0 answers
updating a DQN in R using neuralnet
I am trying to implement a simple case of deep Q learning in R, using the neuralnet package.
I have an initial network with initial random weights. I use it to generate some experience for my agent and as a result, I get states and targets. Then I…

Andreas
- 31
- 1
3
votes
1 answer
How to build a DQN that outputs 1 discrete and 1 continuous value as a pair?
I am building a DQN for an Open Gym environment. My observation space is only 1 discrete value but my actions are:
self.action_space = (Discrete(3), Box(-100, 100, (1,)))
ex: [1,56], [0,24], [2,-78]...
My current neural network is:
model =…

Vincent Roye
- 2,751
- 7
- 33
- 53
3
votes
1 answer
Understanding and Evaluating different methods in Reinforcement Learning
I have been trying to implement the Reinforcement learning algorithm on Python using different variants like Q-learning, Deep Q-Network, Double DQN and Dueling Double DQN. Consider a cart-pole example and to evaluate the performance of each of these…

mkpisk
- 152
- 1
- 9
3
votes
0 answers
assert observation is not None AssertionError when creating observation space for custom environment
EDIT: Fixed it eventually. Solution in bottom of question
I want to create a custom environment to play a game. It plays by using a screengrab of the game as an input and using a DQN outputs either jump, or don't. I have tried a few ways of creating…

Otto Hodne-Tandberg
- 31
- 3
3
votes
3 answers
Tensorflow 2.0 DQN Agent Issue with Custom Environment
So I've been following the DQN agent example / tutorial and I set it up like in the example, only difference is that I built my own custom python environment which I then wrapped in TensorFlow. However, no matter how I shape my observations and…

Ibraheem Nofal
- 487
- 1
- 6
- 13
2
votes
1 answer
Why is my DQN-agent's training so inefficient?
I am trying to train an agent to play tic-tac-toe perfectly as a second player (the first player walks randomly) with the DQN-agent from tf-agents, but my training is extremely slow.
For 100_000 steps, the model did not improve its results in any…

Karasic
- 29
- 3
2
votes
0 answers
keras Model.fit keeps increasing my memory usage
Why running a DQN, the memory of my program increase at every model.fit() call.
using memory_profiler on the train() function in my DQN I get this:
Line # Mem usage Increment Occurrences Line…

MrHurricane
- 21
- 2
2
votes
1 answer
ValueError: Layer "model_69" expects 3 input(s), but it received 96 input tensors
I am trying not to use model.predict() nor model.fit() in a for loop to speed up training so I'm trying to implement this solution to my case but I get an error. The model has three inputs.
This is my code:
n_possible_movements = 9
MINIBATCH_SIZE =…

Ness
- 158
- 1
- 12
2
votes
2 answers
Tf-agent Actor/Learner: TFUniform ReplayBuffer dimensionality issue - invalid shape of Replay Buffer vs. Actor update
I try to adapt the this tf-agents actor<->learner DQN Atari Pong example to my windows machine using a TFUniformReplayBuffer instead of the ReverbReplayBuffer which only works on linux machine but I face a dimensional issue.
[...]
---> 67…

Sch_Stef
- 31
- 4
2
votes
1 answer
OpenAI Gym problem override ObservationWrapper reset() method
I've been trying to solve the pong atari with a DQN. I'm using OpenAI gym for the pong environment.
I've made a custom ObservationWrapper but I'm unable to figure out whats the problem with the reset() method I've overriden.
Error:
Traceback (most…

Levenlol
- 305
- 5
- 17
2
votes
0 answers
Using custom keras model with layer sharing together dqn_agent.DqnAgent()
I am trying to use a custom neural network with the DqnAgent() from tf. In my model I need to use layer sharing. Thus, I use the functional API to build the model. The model has a dict as input and one layer with n neurons as output. The last layer…

Brownie
- 31
- 2