Thank you for the help!
Yeah I 've tried that but then I got this error:
Traceback (most recent call last):
File “<pyshell#4>”, line 1, in 
img_patches.astype(float)
ValueError: setting an array element with a sequence.
So it seems that I have to loop over the items in the “img_patches” to do the conversion as it somehow supports 3D array conversion but not 4D or 5D.
But I want the whole 5D array to be a tensor so that they can be a batch of inputs for the network.
PS: DataLoader does not support my data format.