Question about accuracy --> 0
See original GitHub issueHi,
a question: I applied OpenNRE both with our own dataset (created via DBpedia) and
KBP37. When calling train_demo.py
, eg. with the
KBP37 datasets, during Epoch 1, loss is around 1.7-2.0, and accuracy at 0.18.
Then at the end of Epoch 1, loss goes to ‘inf’, and starting from Epoch 2 accuracy is 0.0, and it stays there.
The same thing happens with my other dataset (based on DBpedia).
I am new to DL, is there something I do wrong, or is the dataset too small, …?
Thank you very much for the feedback, Gerhard
bash $ python2.7 train_demo.py
Dataset Name kbp37
Pre-processed files exist. Loading them...
Finish loading
Total relation fact: 12628
Pre-processed files exist. Loading them...
Finish loading
Total relation fact: 3295
Start training...
2018-10-23 10:02:47.737580: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Calculating weights_table...
train_demo.py:99: RuntimeWarning: divide by zero encountered in divide
_weights_table = 1 / (_weights_table ** 0.05)
Finish calculating
###### Epoch 0 ######
epoch 0 step 78 time 0.79 | loss: inf, not NA accuracy: 0.178651, accuracy: 0.17848177804
Average iteration time: 0.860235
Testing...
Calculating weights_table...
Finish calculating
[TEST] step 20 | not NA accuracy: 0.000000, accuracy: 0.036012
[TEST] auc: 0.0468855111775
Finish testing
Best model, storing...
Finish storing
###### Epoch 1 ######
epoch 1 step 78 time 0.88 | loss: nan, not NA accuracy: 0.000000, accuracy: 0.000949
Average iteration time: 0.822871
Testing...
Calculating weights_table...
Finish calculating
[TEST] step 20 | not NA accuracy: 0.000000, accuracy: 0.036012
[TEST] auc: 0.0468855111775
Finish testing
###### Epoch 2 ######
epoch 2 step 78 time 0.87 | loss: nan, not NA accuracy: 0.000000, accuracy: 0.000949
Average iteration time: 0.844874
Testing...
Calculating weights_table...
Finish calculating
[TEST] step 20 | not NA accuracy: 0.000000, accuracy: 0.036012
[TEST] auc: 0.0468855111775
Finish testing
###### Epoch 3 ######
epoch 3 step 78 time 0.86 | loss: nan, not NA accuracy: 0.000000, accuracy: 0.000949
Average iteration time: 0.885802
Testing...
Calculating weights_table...
Finish calculating
[TEST] step 20 | not NA accuracy: 0.000000, accuracy: 0.036012
[TEST] auc: 0.0468855111775
Finish testing
###### Epoch 4 ######
epoch 4 step 78 time 0.83 | loss: nan, not NA accuracy: 0.000000, accuracy: 0.000949
Average iteration time: 0.877218
Testing...
Calculating weights_table...
Finish calculating
[TEST] step 20 | not NA accuracy: 0.000000, accuracy: 0.036012
[TEST] auc: 0.0468855111775
Finish testing
Issue Analytics
- State:
- Created 5 years ago
- Comments:12
Top Results From Across the Web
What's the best way to represent accuracy of a (0,0) target
Please be sure to answer the question. Provide details and share your research! ... Asking for help, clarification, or responding to other answers ......
Read more >771 questions with answers in ACCURACY | Science topic
Review and cite ACCURACY protocol, troubleshooting and other methodology information | Contact experts in ACCURACY to get answers.
Read more >Why is the accuracy for my Keras model always 0 when ...
Regarding your second question, 'accuracy' indeed can be used only for classification (as it measures the percentage of the correct labels).
Read more >Solved Baseline Accuracy 0/3 points (graded) Now, uncomment
Question : Baseline Accuracy 0/3 points (graded) Now, uncomment the relevant lines in main.py and report the training and validation accuracies of each ......
Read more >Why Accuracy is zero - MATLAB Answers - MathWorks
I showed in https://www.mathworks.com/matlabcentral/answers/894727-why-accuracy-is-zero#comment_1699059 that you can get up to 19% with those exact same ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @pvthuy ah, I just see the variable name is
_weights_table
.For example in train_demo.py:
Hi @gwohlgen , could you let me know which part of codes that you modified? I couldn’t find
_weights_matrix
in the code.Thanks!