We are getting an assertion error in this line "assert dataset". We are printing the dataset object and the value we got was this '<datasets.TextDataset object at 0x000002531F10E408>'. We are using 'python 3.7' in this code. Why are we getting assertion error on dataset object?
We are basically trying to run the code of AttnGAN (https://github.com/taoxugit/AttnGAN). The error is happening on Line: 130 in 'code/main.py'.
Code
dataset = TextDataset(cfg.DATA_DIR, split_dir, base_size=cfg.TREE.BASE_SIZE, transform=image_transform)
print(dataset)
assert dataset
dataloader = torch.utils.data.DataLoader(dataset, batch_size=cfg.TRAIN.BATCH_SIZE, drop_last=True, shuffle=bshuffle, num_workers=int(cfg.WORKERS))
Output
Load from: C:\Users\admin\Desktop\TextToImage\AttnGAN-master (1)\AttnGAN-master\code/../data/birds/captions.pickle
<datasets.TextDataset object at 0x000002531F10E408>
Traceback (most recent call last): File "./code/main.py", line 131, in assert dataset
AssertionError
PS C:\Users\admin\Desktop\TextToImage\AttnGAN-master (1)\AttnGAN-master>