Kaixhin / Rainbow

Rainbow: Combining Improvements in Deep Reinforcement Learning
MIT License
1.56k stars 282 forks source link

Dimension problem in forward function in model.py #8

Closed marintoro closed 6 years ago

marintoro commented 6 years ago

I got an error when I am trying to launch main.py (pulled from master). I got a "Number of dimensions of repeat dims can not be smaller than number of dimensions of tensor" at line 68.

x = v.repeat(1, self.action_space) + a - a_mean.repeat(1, self.action_space)  # Combine streams

Actually the dimension of a_mean is [batch_size,1,51] when the dim of v is [batch_size,51]. I am using Torch version '0.1.12_1'.

I tried quickly to reshape a_mean like v but there is some dimension missmatch later in code so I wanted to know if I were wrong before going deeper (I am pretty new with Pytorch..).

marintoro commented 6 years ago

I was using an outdated version of PyTorch, it's working fine when I upgraded to '0.3.0.post4'...