Comments (17)
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.
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.
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
from deep-crf.
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.
Thats great! But a bug when evaluate!
from deep-crf.
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.
from deep-crf.
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.
from deep-crf.
from deep-crf.
I can send to you via email, is it ok?
from deep-crf.
Please send it to me when you have time.
from deep-crf.
sent! Please check for me. Thank you
from deep-crf.
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.
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.
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.
OK!
If you have other questions, please let me know!
from deep-crf.
Related Issues (20)
- What is --dev_file option? HOT 1
- Fix typo in bi_lstm.py HOT 1
- Trained models HOT 1
- Simplify option of the predict command
- Enable combination of input data and prediction result HOT 2
- Will it support Chainer v3.0.0? HOT 2
- Chainer utils use deprecated methods
- Make stdin and stdout available for prediction HOT 2
- TypeError: coercing to Unicode: need string or buffer, list found HOT 4
- Supported tag format HOT 2
- TypeError: object of type 'int' has no len() HOT 15
- ValueError: need more than 1 value to unpack HOT 6
- ValueError: not enough values to unpack (expected 2, got 0) HOT 1
- What is the required packages with version ? HOT 3
- ValueError: Invalid input feature sizes HOT 4
- Please add (back) an optional `deterministic` argument for CNN
- ModuleNotFoundError: No module named 'deepcrf'
- --dev HOT 2
- Will it support Python 3.x? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deep-crf.