The method just splits the data using your arguments as described in the docs 34.
I assume you want to permute the dimensions in this line of code:
test_x = test_x.reshape(len(test_x), 3, 224, 224)

which won’t work as expected, since reshape will interleave the data. Use transpose in numpy or permute in PyTorch instead to swap the dimensions.