INNER CODE UNIT · Python

batch_samples

dailenson/SDT · test.py:52

        batch_samples = int(opt.sample_size)*len(writer_dict)//cfg.TRAIN.IMS_PER_BATCH

    batch_num, num_count= 0, 0
    data_iter = iter(test_loader)
    with torch.no_grad():
        for _ in tqdm.tqdm(range(batch_samples)):
            batch_num += 1
            if batch_num > batch_samples:
                break
            else:
                data = next(data_iter)
                # prepare input
                coords, coords_len, character_id, writer_id, img_list, char_img = data['coords'].cuda(), \
                    data['coords_len'].cuda(), \
                    data['character_id'].long().cuda(), \
                    data['writer_id'].long().cuda(), \
                    data['img_list'].cuda(), \
                    data['char_img'].cuda()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…