Skip to content

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

Description

@sunyclj

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]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions