Based on your current code it seems that train_input as well as train_targets have the temporal dimension in dim0, since you are indexing them as:
for t in range(seq_len):    # For each one in the input sequence.
        output, hidden, change = net(train_inputs[t], hidden)
        loss= loss+ loss_func(change,train_targets[t])

If that’s the case, then train_inputs[t] would have the shape [batch_size, features] after the indexing?
Are you using a batch size of 1, as the last screenshot prints the shape [1, 8]?
I’m not familiar with your use case and I would need to get more information about the input and target shapes as well as about the general use case.
Note that the majority of layers will accept an input in the shape [batch_size, *], so you would have to make sure to keep this shape. If you are indexing the batch dimension, you would only use a single sample instead of the complete batch.