It seems the data provided by the DataLoader does not contain enough values to be reshaped to [10, 30, 1]. Could you check the shape of train_x_np?
However, if the error occurs later in the training and the first iterations are running successful, the last batch might be smaller, thus yielding this error.
In this case, you could drop the last batch using drop_last=True in your DataLoader or alternatively reshape to a variable shaped tensor:
t_x1 = x1.view(-1, 30, 1)

As a small side note: if you would like to create tensors from numpy arrays, you should use torch.from_numpy(array).