@Tahir
Thanks for you answer.
I want to add only inputs that satisfy the conditions.
So the size(dim==0) depends on whether the inputs are satisfied or not.
list_x = []
for batch_idx, input in enumerate(data_loader):
   list_x.append(input) # save input images under some conditions

new_data_loader = DataLoader(list_x, ...)
   

In this purpose, Is there any soultions ?