Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sunyclj opened this issue Nov 26, 2021 · 0 comments
Open

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

sunyclj opened this issue Nov 26, 2021 · 0 comments

Comments

@sunyclj
Copy link

sunyclj commented Nov 26, 2021

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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant