Relative Content

Tag Archive for pythonpytorchneural-networkartificial-intelligencetext-classification

PyTorch model classifies everything as one class

I want to implement binary text classification with PyTorch and Doc2Vec. I’ve vectorized my data and everything seemed fine so far. Next, I implemented my neural network and tried to train it but it seemed to not learn at all. It classifies everything as class 0 which is the majority class (imbalanced dataset) so the resulting accuracy is high but this is not the behavior I want to achieve.