Open behradkoohy opened 2 years ago
I guess from the error message it is due to the shape issue of your network's output.
File "/Users/behradkoohy/sumo-scratchpad/RESCO/venv/lib/python3.8/site-packages/pfrl/action_value.py", line 70, in evaluate_actions
return self.q_values.gather(dim=1, index=index).flatten()
RuntimeError: Size does not match at dimension 0 expected index [32, 1] to be smaller than self [1, 3] apart from dimension 1
This suggests that q_values
, which is the output of your network, has a shape of (1, 3)
, which is probably unexpected since q_values
must have a shape of (batch_size, num_actions)
for DiscreteActionValue
. It would help to check why the output has such a shape.
Hi,
I'm trying to setup a DQN agent with a graph attention layer. The agent can take one of 3 actions. For some reason, when I run the training function, I see the following error:
I'm somewhat lost as to where to go with this. The neural network works absolutely fine when a Conv2D is used, but doesn't like the graph attention layer despite the same output dimensions etc.
Thanks