-
Notifications
You must be signed in to change notification settings - Fork 26
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
How do I run ner on other language like chinese? #31
Comments
@SuMarsss great to see you have trained Chinese XLNet model and build your own Sentence Piece model To prepare your label.vocab (which is different from your Sentence Piece control_symbols), you can use the following one,
|
And you should also make sure the |
When I tried the label.vocal as you said , another error occured.
xlnet/model_utils.py:147: run_ner.py:608: |
Looks like gradient exploding issue, could you provide more details (e.g.
all vocab list, hyperparam, sentence piece model, etc.) for debugging?
…On Wed, Jul 10, 2019 at 12:18 AM SuMarsss ***@***.***> wrote:
special_vocab_list
When I tried the label.vocal as you said , another error occured.
InvalidArgumentError (see above for traceback): Found Inf or NaN global
norm. : Tensor had NaN values
[[node VerifyFinite/CheckNumerics (defined at xlnet/model_utils.py:147) ]]
[[node replica_1/loss/truediv (defined at run_ner.py:608) ]]
xlnet/model_utils.py:147:
clipped, gnorm = tf.clip_by_global_norm(gradients, FLAGS.clip)
run_ner.py:608:
loss = tf.reduce_sum(cross_entropy * label_mask) /
tf.reduce_sum(tf.reduce_max(label_mask, axis=-1))
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#31?email_source=notifications&email_token=ABYXYMZTJ5HD363JPI3GJ7LP6WENDA5CNFSM4H7CE2WKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZSRNCQ#issuecomment-509941386>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABYXYM5CUCY5BAYUKO4LWFDP6WENDANCNFSM4H7CE2WA>
.
--
Best,
Mingzhi
|
I have fiix the buged, but I want do output f1_score and precison |
@SuMarsss , you can run the following command to get precision/recall/f1 score
|
@charlesXu86 actually I couldn't reproduce this issue, no clue how to resolve it |
@youbingchenyoubing no fix is applied yet, since I couldn't reproduce this issue. Could you provide more details for your problem? |
File "/home/chenyoubing/virtualplace/xlnet/lib/python3.6/site-packages/tensorflow/contrib/tpu/python/tpu/tpu_estimator.py", line 1323, in call_without_tpu InvalidArgumentError (see above for traceback): Found Inf or NaN global norm. : Tensor had NaN values |
@youbingchenyoubing Sorry, based on the error message, I can't figure out how |
chinese resume ner used in my experiment. |
can xlnet support no fixed context? |
@SuMarsss / @charlesXu86 / @youbingchenyoubing, sorry, I still can't repro this issue on CoNLL2003 dataset and I think I'll not support Chinese NER in the near future |
awsome, thx |
I have pretrained xlnet on a large chinese corpus, but how do I run the ner.py and what is label.vocab.
Here is my parameters to train the Sentence Piece model
This my pretrained result.
So the
label.vocab
should be like this ?The text was updated successfully, but these errors were encountered: