Solved by ptrblck in post #2 
              
              
                The dimension of batch_in[0] is [3, 1], so you have to make sure to assign a tensor with the same dims: 
batch_in[0] = torch.Tensor([[1], [2], [3]])