Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confuse problem #4

Closed
chzeze opened this issue Nov 21, 2017 · 13 comments
Closed

Confuse problem #4

chzeze opened this issue Nov 21, 2017 · 13 comments

Comments

@chzeze
Copy link

chzeze commented Nov 21, 2017

Hi Max
Is NERCRF.py the same to the bi_lstm_cnn_crf.py in the LasagneNLP?

@XuezheMax
Copy link
Owner

XuezheMax commented Nov 21, 2017 via email

@chzeze
Copy link
Author

chzeze commented Nov 21, 2017

I use the database UKPLabhttps://github.com/UKPLab/acl2017-neural_end2end_am/tree/master/data/conll/Paragraph_Level run NERCRF.py and bi_lstm_cnn_crf.py they display diferent result.
NERCRF.py run result precision recall F1 almost zero:
Epoch 1 (LSTM(std), learning rate=0.0100, decay rate=0.0500 (schedule=1)):
train: 96 loss: 1050766784.1735, time: 351.21s
dev acc: 11.67%, precision: 0.00%, recall: 0.00%, F1: 0.00%
best dev acc: 0.00%, precision: 0.00%, recall: 0.00%, F1: 0.00% (epoch: 0)
best test acc: 0.00%, precision: 0.00%, recall: 0.00%, F1: 0.00% (epoch: 0)
Epoch 2 (LSTM(std), learning rate=0.0095, decay rate=0.0500 (schedule=1)):
train: 96 loss: 102558966.3255, time: 258.39s
dev acc: 11.69%, precision: 0.00%, recall: 0.00%, F1: 0.00%
best dev acc: 0.00%, precision: 0.00%, recall: 0.00%, F1: 0.00% (epoch: 0)
best test acc: 0.00%, precision: 0.00%, recall: 0.00%, F1: 0.00% (epoch: 0)
Epoch 3 (LSTM(std), learning rate=0.0091, decay rate=0.0500 (schedule=1)):
train: 96 loss: 47132442.5896, time: 257.53s
dev acc: 11.67%, precision: 0.00%, recall: 0.00%, F1: 0.00%
best dev acc: 0.00%, precision: 0.00%, recall: 0.00%, F1: 0.00% (epoch: 0)
best test acc: 0.00%, precision: 0.00%, recall: 0.00%, F1: 0.00% (epoch: 0)

......

@chzeze
Copy link
Author

chzeze commented Nov 21, 2017

I use the eval to count f1 :
@ManniSingh @XuezheMax
processed 12227 tokens with 501 phrases; found: 6261 phrases; correct: 0.
accuracy: 16.33%; precision: 0.00%; recall: 0.00%; FB1: 0.00
Claim: precision: 0.00%; recall: 0.00%; FB1: 0.00 2
MajorClaim: precision: 0.00%; recall: 0.00%; FB1: 0.00 0
Premise: precision: 0.00%; recall: 0.00%; FB1: 0.00 6259
why they are zero?

one of tmp/942fb2_dev11
942fb2_dev11.txt

@ManniSingh
Copy link

It seems PyTorch problem, you should clean restart.

@XuezheMax
Copy link
Owner

XuezheMax commented Nov 21, 2017 via email

@chzeze
Copy link
Author

chzeze commented Nov 22, 2017

Yes ,I have the tmp dir ,the dir contain dev predicton file and score file.
I just confuse why run NERCRF.py and bi_lstm_cnn_crf.py they display diferent result.
use database https://github.com/UKPLab/acl2017-neural_end2end_am/tree/master/data/conll/Paragraph_Level

@bbruceyuan
Copy link

hello, Max, thank you for your great contribution on the awesome work.

I met the exactly same problem because I use the same dataset as described by @chzeze .

Does anyone solved this problem?

If there exist any solution, please let me know.

**thank you all of you **

@XuezheMax
Copy link
Owner

Hi @hey-bruce and @chzeze ,
I guess I have found the reason. Each line in the data you provided are separated by '\t', where the format in the NERCRF.py is whitespace ' '.

@bbruceyuan
Copy link

thank you for your reply.

I reformated the data. and now each line in the date are separated by ' '(whitespace).

the problem is also there.

I can offer you the data through my github repo, can you test it?

thank u

@XuezheMax
Copy link
Owner

Yes, please share me the data.
Thanks.

@bbruceyuan
Copy link

You can get the data from here

thank you.

the motivation that I used your method is I am trying my best to reproduce the artical. And the author used your repo "LasagneNLP"。thank you again

@XuezheMax
Copy link
Owner

Hi @hey-bruce ,
My previous reader cannot handle multiple continuous blank lines. I have revised my code to handle it.
Now the stats info can match the one reported in the paper.
But the performance is still zero. I guess it is not an issue for the model. Please first check if you use the model the right way. Second, please make sure that the evaluation script for NER is suitable for the new task. The evaluation script used in my code is from CoNLL 2003 shared task, which is designed for NER.

Before you run your code locally, please make sure that you do the following two things:

  1. git pull to get the latest version.
  2. remove the data/alphabets/ folder to create a new one. If the code detect the folder, it will assumes that the alphabets have already been created and will try to load them from disk.

@bbruceyuan
Copy link

I really appreciate your help.

I tried it just now. And yes, it's not your model's issue and the evaluation script is not suitable for my task. maybe I should find a new strategy to evaluate it.

And I think you can close this issue now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants