DQN is a multi-layered neural network, added target network and experience replay to Q-learning
Questions tagged [dqn]
206 questions
0
votes
1 answer
Stable Baselines3 - Setting "manually" the q_values
What I have done
I'm using the DQN Algorithm in Stable Baselines 3 for a two players board type game. In this game, 40 moves are available, but once one is made, it can't be done again.
I trained my first model with an opponent which would choose…

Lucas1283
- 61
- 1
- 5
0
votes
1 answer
TFAGENTS: clarification on the usage of observation_and_action_constraint_splitter for DqnAgent agents
im trying to create a DqnAgent agent with a mask for valid/invalid actions, according to this post
, i should specify a splitter_fn for the observation_and_action_constraint_splitter arg. According to the tf_agents doc
, the splitter_fn would be…

John
- 309
- 3
- 12
0
votes
1 answer
Unable to allocate memory with array shape to create reinforcement learning model
I am trying to create a DQN model for mario environment. But when I try to create the model it gives me this error:
MemoryError: Unable to allocate 229. GiB for an array with shape (1000000, 1, 4, 240, 256) and data type uint8
This is the code for…

Din
- 61
- 8
0
votes
1 answer
DQN's Q-loss converaged but it performed poorly
I am trying to code my own DQN in Python, using pytorch. I am trying it on the CartPole environment.
Although the Q-loss converaged, the model performed poorly.
Replay buffer was also used in the model with a size of 2000 and the double networks…

bering pan
- 1
- 1
0
votes
1 answer
What does the question mark mean in Keras Reinforcement Learning and how can I replicate it?
I'm currently working on a reinforcement learning model, and have come across an issue while trying to create a DQN to work within my custom environment.
While instantiating the DQN agent with this line:
dqn = DQNAgent(model=model, memory=memory,…

Jack Hasselbring
- 13
- 1
0
votes
0 answers
Error:DQN expects a model that has one dimension for each action, in this case (1, 2, 1, 0)
i am building an RL agent for which the model is defined:
def build_model(states, actions):
azioni = list(actions)
model = Sequential()
model.add(Dense(4, activation='relu', input_shape=[len(azioni)]))
model.add(Dense(4, activation='relu'))
return…

Michele Raso
- 15
- 5
0
votes
0 answers
TypeError: argument of type 'method' is not iterable (Tensorforce DQN Tutorial)
I am trying to do a tensorforce tutorial with a DQN algorithm, but I am running into some errors. It seems that tensorforce has been updated since this tutorial was written, so I am trying to figure things out on my own with the documentation.…

Dylan Skinner
- 26
- 1
- 4
0
votes
0 answers
How can I speed up my LSTM DQN training time?
I tried implementing my own DQN with LSTM model and the problem is that it's taking too long to run. For instance, running 2 episodes takes 10 mins, and each episode only has around 1.2k time steps (financial time series). I'm not sure if there are…

Ryan aA
- 1
- 2
0
votes
1 answer
Fine-tuning with a very low learning rate. Any sign that something is not good?
I have working with deep reinforcement learning and in the literature, usually the learning rates are lower than I found in other settings.
My model is the following one:
def create_model(self):
model = Sequential()
…

HenDoNR
- 79
- 1
- 12
0
votes
0 answers
Cache environment for DQN
I need to make a cache environment for my DQN Agent. I need to do network caching, when a file is needed it goes on cache if there is space. If the file is in cache, the agent has a reward. If the file is not in cache and the agent doesn't put it in…

mark99
- 1
- 2
0
votes
1 answer
Action-selection for dqn with pytorch
I’m a newbie in DQN and try to understand its coding. I am trying the code below as epsilon greedy action selection but I am not sure how it works
if sample > eps_threshold:
with torch.no_grad():
# t.max(1) will return…

John Smith
- 15
- 5
0
votes
0 answers
Solving "TypeError: max() received an invalid combination of arguments - got (out=NoneType, axis=NoneType, ) but expected?"
I am working on a Deep Q-Learning Reinforcement Learning algorithm for Pommerman environment.
I initially got this RuntimeError: mat1 and mat2 shapes cannot be multiplied (1x30 and 201x128) error when I ran the main function, but I was able to get…

Tyler Kim
- 181
- 1
- 11
0
votes
1 answer
How to make faster deep reinforcement learning training
As you know, Deep Reinforcement Learning (DRL) training could take more than 10 days using single CPU. Using parallel execution tools (such as CUDA), the training time decreases up to 1 day (depending on the CPU and GPU features). But when using…

Kubilay Demir
- 1
- 1
0
votes
1 answer
index 1 is out of bounds for dimension 0 with size 1
I am starting to learn about DQN, and I am trying to solve the FrozenLake-v0 problem from scratch by my self and using Pytorch so I will put the whole code since it's connected.
class LinearDeepQNetwork(nn.Module):
def…

noob
- 672
- 10
- 28
0
votes
1 answer
loaded keras model doesn't have predict method
In the DQN algorithm, the agent is trained successfully and the model is saved as a .h5 file.
The agent class has a method called load as follows:
def load(self):
new_model = load_model('dqn_model.h5')
if self.epsilon == 0.0:
…

Alireza Hosseini
- 19
- 3