Okay, I solved the issue. I padded my tensors with this function (inside the dataset):
 def pad_tensor(t):
     t = torch.tensor(t)
     padding = max(max_review_len) - t.size()[0]
     t = torch.nn.functional.pad(t, (0, padding))
     return t