Based on the input shape I assume you are using a batch_size of 1 and the input tensor has 18 channels.
You could add the permute operation after loading the batch, but note that the channels would now be treated as separate samples since they are in the batch dimension.
Also, the permutation would move the batch dimension to the channel dimension. Increasing the batch size would also increase the number of channels.
Could you explain your use case a bit more, as this sounds rather wrong?