Hallo community,
I was trying to create a simple sentiment analysis model in Pytorch and I wanted to use torchtext.
train_dataset = torchtext.datasets.IMDB(root=‘./datasets’, split=‘train’)
test_dataset = torchtext.datasets.IMDB(root=‘./datasets’, split=‘test’)
dl = DataLoader(train_dataset, batch_size=1000, shuffle=True)
next(iter(dl))[0]
When I use the above code I expected to get a mixture of 0’s and 1’s as the sentiment value, but for some reasons I get only 1’s.
Is there something wrong on my end?