Suppose I have a list tensors in the same size. Is there any unified function to merge all these like np.array(array_list) in case you have list or numpy arrays.

This is my current solution

data = th.zeros([len(imgs), imgs[0].size()[0], imgs[0].size()[1], imgs[0].size()[2]])
for i, img in enumerate(imgs):
print(img.size())
print(img.type())
data[i] = img