rasbt / machine-learning-book

Code Repository for Machine Learning with PyTorch and Scikit-Learn
https://sebastianraschka.com/books/#machine-learning-with-pytorch-and-scikit-learn
MIT License
3.61k stars 1.3k forks source link

Updated for new torchtext and solved issue with 100% accuracy #137

Closed sabre-code closed 1 year ago

sabre-code commented 1 year ago

Found the issue with 100% accuracy. The labels in IMDB dataset were "pos" and "neg" earlier. Now they are 1 and 2 for positive and negative respectively. Tested on Colab and got expected results. Screenshot 2023-07-15 175804

fixes #135

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

rasbt commented 1 year ago

Thanks for the patch. I just checked and it works for me. I made some additional changes that will also make it work for readers who use the older torchtext version (it's just an if/else version check). Somehow I can't push to this branch due to a permission error (maybe "allowing contributions from maintainers" was disabled for this PR) so I will do that after merging. Thanks for the fix!

sabre-code commented 1 year ago

Sounds great. Thanks a lot for this great book. ♥️