TextCNN Pytorch实现 中文文本分类 情感分析
Convolutional Neural Networks for Sentence Classification
https://github.com/Embedding/Chinese-Word-Vectors
(这里用的是Zhihu_QA 知乎问答训练出来的word Word2vec)
python3 main.py -h
python3 main.py
python main.py
Batch[1800] - loss: 0.009499 acc: 100.0000%(128/128)
Evaluation - loss: 0.000026 acc: 94.0000%(6616/7000)
early stop by 1000 steps, acc: 94.0000%
python main.py -static=true
Batch[1900] - loss: 0.011894 acc: 100.0000%(128/128)
Evaluation - loss: 0.000018 acc: 95.0000%(6679/7000)
early stop by 1000 steps, acc: 95.0000%
python main.py -static=true -non-static=true
Batch[1500] - loss: 0.008823 acc: 99.0000%(127/128))
Evaluation - loss: 0.000016 acc: 96.0000%(6729/7000)
early stop by 1000 steps, acc: 96.0000%
python main.py -static=true -non-static=true -multichannel=true
Batch[1500] - loss: 0.023020 acc: 98.0000%(126/128))
Evaluation - loss: 0.000016 acc: 96.0000%(6744/7000)
early stop by 1000 steps, acc: 96.0000%