uvipen / character-level-cnn-pytorch Goto Github PK
View Code? Open in Web Editor NEWCharacter-level CNN for text classification
License: MIT License
Character-level CNN for text classification
License: MIT License
I have trained yelp_review_polarity_small model,and get accuracy 0.5,the output like that
Epoch: 1/20, Iteration: 1751/2188, Lr: 0.001, Loss: 0.6997024416923523, Accuracy: 0.4375
Epoch: 1/20, Iteration: 1801/2188, Lr: 0.001, Loss: 0.7156904935836792, Accuracy: 0.4765625
Epoch: 1/20, Iteration: 1851/2188, Lr: 0.001, Loss: 0.6968995928764343, Accuracy: 0.51953125
Epoch: 1/20, Iteration: 1901/2188, Lr: 0.001, Loss: 0.6940716505050659, Accuracy: 0.50390625
Epoch: 1/20, Iteration: 1951/2188, Lr: 0.001, Loss: 0.6941938400268555, Accuracy: 0.4609375
Epoch: 1/20, Iteration: 2001/2188, Lr: 0.001, Loss: 0.694003701210022, Accuracy: 0.50390625
Epoch: 1/20, Iteration: 2051/2188, Lr: 0.001, Loss: 0.6908363103866577, Accuracy: 0.52734375
Epoch: 1/20, Iteration: 2101/2188, Lr: 0.001, Loss: 0.7009902596473694, Accuracy: 0.46484375
Epoch: 1/20, Iteration: 2151/2188, Lr: 0.001, Loss: 0.6958677172660828, Accuracy: 0.484375
Epoch: 1/20, Lr: 0.001, Loss: 0.6933960318565369, Accuracy: 0.5
Epoch: 2/20, Iteration: 1/2188, Lr: 0.001, Loss: 0.6975014209747314, Accuracy: 0.4296875
Epoch: 2/20, Iteration: 51/2188, Lr: 0.001, Loss: 0.6942330002784729, Accuracy: 0.50390625
Epoch: 2/20, Iteration: 101/2188, Lr: 0.001, Loss: 0.6899641156196594, Accuracy: 0.5234375
And log.txt file
Model's parameters: {'alphabet': 'abcdefghijklmnopqrstuvwxyz0123456789,;.!?:\'"/\\|_@#$%^&*~`+-=<>()[]{}', 'max_length': 1014, 'feature': 'small', 'optimizer': 'adam', 'batch
_size': 256, 'num_epochs': 20, 'lr': 0.001, 'dataset': 'yelp_review_polarity', 'es_min_delta': 0.0, 'es_patience': 3, 'input': 'input/yelp_review_polarity_csv', 'output': 'ou
tput/yelp_review_polarity_small', 'log_path': 'tensorboard/char-cnn'}Epoch: 1/20
Test loss: 0.6933960318565369 Test accuracy: 0.5
Test confusion matrix:
[[ 0 19000]
[ 0 19000]]
I don't know why, this is diffirent with your result, please help me, thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.