amanchadha / iSeeBetter

iSeeBetter: Spatio-Temporal Video Super Resolution using Recurrent-Generative Back-Projection Networks | Python3 | PyTorch | GANs | CNNs | ResNets | RNNs | Published in Springer Journal of Computational Visual Media, September 2020, Tsinghua University Press
https://arxiv.org/abs/2006.11161
MIT License
359 stars 68 forks source link

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

Open sunyclj opened 2 years ago

sunyclj commented 2 years ago

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]