The reason I specified this code:
for e in unb:
        if(e.dim()==0):
            e.unsqueeze_(0)

I will get this error without it:
     25     def forward(self, *cs):
     26 
---> 27         mbs = cs[0].size(0)
     28         h = torch.zeros(mbs, n_hidden).to("cuda")
     29 

RuntimeError: dimension specified as 0 but tensor has no dimensions