What mratsim meant was to use numpy.stack to convert the list of 3D numpy array into a 4D Numpy array and then convert it a Torch Tensor using constructor,  from_numpy, etc.
# Example
# I am assuming trX is a list of image arrays (1, 224, 224, 3)
# of length L = 0.8 * len(files)
>>> import numpy as np
>>> a = np.asarray(trX)
>>> a.shape # should be (L, 1, 224, 224, 3)
>>> a = np.squeeze(a, axis=1) # shape should now be (L, 224, 224, 3)
>>> import torch
>>> b = torch.floatTensor(a) # or torch.from_numpy(a)