0
Hypehn
3y

It was my first time doing an NLP task / implementing a RNN and I was using the torchtext library to load and do sentiment analysis on the IMDB dataset. I was able to use collate_fn and batch_sampler and create a DataLoader but it gets exhausted after a single epoch. I’m not sure if this is the expected behavior, if it is then do I need to initialize a new DataLoader for every epoch? If not is something wrong with my implementation, please provide me the correct way to implement the same.

PS. I was following the official changelog() of torchtext from github

You can find my implementation here

changelog - https://github.com/pytorch/text/...

My implementation - https://colab.research.google.com/d...

Comments
Add Comment