The difference is not in the way tf and pytorch store tensors it is the fact that their convolutional layers output different shapes. In tensorflow the conv1d layers have an output of (batch size, new steps, filters) while in pytorch the output of conv1d is shaped (batch size, filters, new steps). This is what makes the difference not the tensors themselves.