GithubHelp home page GithubHelp logo

Comments (17)

aonotas avatar aonotas commented on July 20, 2024

Hi @binhna,

Thank you for your report.
Could you tell me your command?

I think you didn't set --dev_file argument?

from deep-crf.

aonotas avatar aonotas commented on July 20, 2024

I have modified README.md to set --dev_file input_file_dev.txt.

Please let me know if you have some problems.

from deep-crf.

binhna avatar binhna commented on July 20, 2024

Thank you very much. But I still have a problem when predicting:

Binhs-MacBook-Pro:deep-crf BinhNguyen$ deep-crf predict input_raw_file.txt --model_name bilstm-cnn-crf --model_filename /Users/BinhNguyen/Downloads/deep-crf/save_model_dir/bilstm-cnn-crf_adam_epoch26.model --predicted_output predicted.txt
{'dropout_rate': 0.33, 'vocab_file': None, 'n_char_hidden': 30, 'batchsize': 32, 'model_filename': '/Users/BinhNguyen/Downloads/deep-crf/save_model_dir/bilstm-cnn-crf_adam_epoch26.model', 'use_crf': 1, 'vocab_char_file': None, 'weight_decay': 0.0, 'optimizer': u'adam', 'n_hidden': 200, 'efficient_gpu': 1, 'init_lr': 0.001, 'use_lr_decay': 0, 'use_cudnn': 1, 'n_word_emb': 100, 'predicted_output': u'predicted.txt', 'gpu': -1, 'save_name': u'', 'test_file': None, 'word_emb_file': None, 'max_iter': 50, 'n_layer': 1, 'dev_file': None, 'word_emb_vocab_type': u'replace_all', 'n_vocab_min_cnt': 0, 'input_idx': u'0', 'output_idx': u'-1', 'delimiter': u'\t', 'n_char_emb': 30, 'save_dir': u'save_model_dir', 'n_add_feature_emb': 100, 'model_name': u'bilstm-cnn-crf'}
[2017-09-21 08:12:38,640] [INFO] train:2388 ([email protected]:230)
[2017-09-21 08:12:38,640] [INFO] dev  :0 ([email protected]:231)
[2017-09-21 08:12:38,640] [INFO] test :0 ([email protected]:232)
[2017-09-21 08:12:38,640] [INFO] vocab     :17496 ([email protected]:233)
[2017-09-21 08:12:38,640] [INFO] vocab_tags:9 ([email protected]:234)
[2017-09-21 08:12:38,640] [INFO] unk count (train):4566 ([email protected]:235)
[2017-09-21 08:12:38,641] [INFO] unk rate  (train):0.0686203787196 ([email protected]:236)
[2017-09-21 08:12:38,641] [INFO] cnt all words (train):66540 ([email protected]:237)
[2017-09-21 08:12:38,641] [INFO] unk count (dev):0 ([email protected]:238)
[2017-09-21 08:12:38,641] [INFO] unk rate  (dev):0.0 ([email protected]:239)
[2017-09-21 08:12:38,641] [INFO] cnt all words (dev):0 ([email protected]:240)
[2017-09-21 08:12:38,641] [INFO] ###################### ([email protected]:242)
[2017-09-21 08:12:38,641] [INFO] ## Model Config ([email protected]:243)
[2017-09-21 08:12:38,641] [INFO] model_name:bilstm-cnn-crf ([email protected]:244)
[2017-09-21 08:12:38,641] [INFO] batchsize:32 ([email protected]:245)
[2017-09-21 08:12:38,641] [INFO] optimizer:adam ([email protected]:246)
[2017-09-21 08:12:38,641] [INFO] ###################### ([email protected]:248)
[2017-09-21 08:12:38,641] [INFO] ## Model Save Config ([email protected]:249)
[2017-09-21 08:12:38,641] [INFO] save_dir :save_model_dir/ ([email protected]:250)
[2017-09-21 08:12:38,641] [INFO] save_vocab        :save_model_dir/bilstm-cnn-crf_adam.vocab ([email protected]:253)
[2017-09-21 08:12:38,642] [INFO] save_vocab_char   :save_model_dir/bilstm-cnn-crf_adam.vocab_char ([email protected]:254)
[2017-09-21 08:12:38,642] [INFO] save_tags_vocab   :save_model_dir/bilstm-cnn-crf_adam.vocab_tag ([email protected]:255)
[2017-09-21 08:12:38,642] [INFO] save_train_config :save_model_dir/bilstm-cnn-crf_adam.train_config ([email protected]:256)
Traceback (most recent call last):
  File "/usr/local/bin/deep-crf", line 11, in <module>
    load_entry_point('DeepCRF==1.0', 'console_scripts', 'deep-crf')()
  File "/Library/Python/2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Library/Python/2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Library/Python/2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Python/2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "build/bdist.macosx-10.12-intel/egg/deepcrf/__init__.py", line 112, in predict
  File "build/bdist.macosx-10.12-intel/egg/deepcrf/main.py", line 367, in run
UnboundLocalError: local variable 'predict_dev_tags' referenced before assignment

image

from deep-crf.

aonotas avatar aonotas commented on July 20, 2024

Hi @binhna
I'm sorry for that bug.
I have modified that bug few days ago.

So can you update the deep-crf with following commands?

cd deep-crf
git pull
python setup.py install

from deep-crf.

binhna avatar binhna commented on July 20, 2024

Thats great! But a bug when evaluate!
image

from deep-crf.

aonotas avatar aonotas commented on July 20, 2024

Thank you for your report and I'm sorry for that bug.
Can you show me your gold.txt and predicted.txt?

head -n 20 gold.txt
head -n 20 predicted.txt

from deep-crf.

binhna avatar binhna commented on July 20, 2024

image

from deep-crf.

aonotas avatar aonotas commented on July 20, 2024

I think that the line of your file is difference?
please tell me your number of line in gold and predicted.

wc -l gold.txt
wc -l predicted.txt

from deep-crf.

binhna avatar binhna commented on July 20, 2024

image
image

from deep-crf.

binhna avatar binhna commented on July 20, 2024

image

from deep-crf.

binhna avatar binhna commented on July 20, 2024

I can send to you via email, is it ok?

from deep-crf.

aonotas avatar aonotas commented on July 20, 2024

OK.
[email protected]

Please send it to me when you have time.

from deep-crf.

binhna avatar binhna commented on July 20, 2024

sent! Please check for me. Thank you

from deep-crf.

aonotas avatar aonotas commented on July 20, 2024

Thank you.
I checked your gold file.

Around line 29 - 65, it seems wrong sentence between gold.txt and predicted.txt .
Please check your input_raw_file.txt whether input_raw_file.txt and gold.txt have same sentence order?

from deep-crf.

aonotas avatar aonotas commented on July 20, 2024

can you tell me ?

head -n 5 input_raw_file.txt

I think input_raw_file.txt should contains words number.

line 1: 28 words
line 2: 35 words
line 3: 31 words

from deep-crf.

binhna avatar binhna commented on July 20, 2024

I'm sorry for the inconvenience. It's my fault, exactly what you say. The input_raw_file.txt is incorrect. I fixed and it worked now.
Thank you very much.

from deep-crf.

aonotas avatar aonotas commented on July 20, 2024

OK!
If you have other questions, please let me know!

from deep-crf.

Related Issues (20)

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.