I think the view operations are wrong, as they would interleave the tensor:
        output, hidden = self.gru(input1.view(seq_len,-1,input_features))         
        pred = self.out1(output.view(-1,seq_len,hidden_size*2)) 

as shown in this code snippet:
batch_size, seq_len, c, h, w = 2, 3, 4, 2, 2
x = torch.zeros(batch_size, seq_len, c, h, w)
# set batch1 to ones
x[1] = 1.
print(x)

y = x.view(seq_len, batch_size, -1)
print(y[:, 1]) # not all ones, as y is interleaved

z = x.permute(1, 0, 2, 3, 4).view(seq_len, batch_size, -1)
print(z[:, 1]) # all ones