iSeeBetter icon indicating copy to clipboard operation
iSeeBetter copied to clipboard

why does batch have batch[0]、batch[1].......

Open sunyclj opened this issue 2 years ago • 0 comments

I don't understand this part of the test code,I think testing_data_loader is the test set data,only one image ,Why does batch have a lot of data,such as batch[0]、batch[1]....... code: for batch in testing_data_loader: #import pdb;pdb.set_trace() input, target, neigbor, flow, bicubic = batch[0], batch[1], batch[2], batch[3], batch[4] with torch.no_grad(): if cuda: input = Variable(input).cuda(gpus_list[0]) bicubic = Variable(bicubic).cuda(gpus_list[0]) neigbor = [Variable(j).cuda(gpus_list[0]) for j in neigbor] flow = [Variable(j).cuda(gpus_list[0]).float() for j in flow] else: input = Variable(input).to(device=device, dtype=torch.float) bicubic = Variable(bicubic).to(device=device, dtype=torch.float) neigbor = [Variable(j).to(device=device, dtype=torch.float) for j in neigbor] flow = [Variable(j).to(device=device, dtype=torch.float) for j in flow]

sunyclj avatar Nov 26 '21 08:11 sunyclj