RuntimeError: t() expects a 2D tensor, but self is 3D`
Opened this issue · 2 comments
Hi,
Running EnvtestStock_RPG.ipynb I get the following error:
`---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
in
14 state=next_state
15 if env.pointer%64==0:
---> 16 agent.train()
17 pv,pp,pw=env.get_summary()
18 total_pv=pv.sum(axis=1)
in train(self)
73 def train(self):
74 self.optimizer.zero_grad()
---> 75 s = torch.stack(self.s_buffer).t()
76 s_next = torch.stack(self.s_next_buffer).t()
77 r = torch.stack(self.r_buffer).t()
RuntimeError: t() expects a 2D tensor, but self is 3D`
In particular, self.s_buffer is a list of 54 tensors, each of size: torch.Size([6, 36])
Do you know what might be causing it?
Thank you in advance
EDIT: my torch version is 1.0.1
I have the same issue.
try use pytorch 0.4.0?