Equivalent of Numpy's list.append() for differentiable Variables

Hi, i think the last row shoule be var_tensor = torch.stack(var).

Example see here: How to turn a list of tensor to tensor? - #4 by dmadeka1

1 Like