Giter VIP home page Giter VIP logo

character-level-cnn-pytorch's Issues

The accuracy always be 0.5

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.