Despite the fact, that your actual code does not seem to work (@aplassard mentioned), this should work:
x_perm = x.transpose(0,1)
for frame in x_perm.split(1):
    out1, hidden = self.rnn_layer1(frame.squeeze(0), hidden) 

Edit: what your hack actually does is allocating new storage and copying the tensor. Regarding this a simple x[:,frame,:,:].clone()  or x[:,frame,:,:].contiguous() might do the trick as well