kyzhouhzau / BERT-NER

Use Google's BERT for named entity recognition (CoNLL-2003 as the dataset).
MIT License
1.24k stars 335 forks source link

when i predict on my test data set ,i got this problem. #48

Open ohho-zb opened 5 years ago

ohho-zb commented 5 years ago

ValueError: Assignment map with scope only name dense_37 should map to scope only dense_37/bias. Should be 'scope/': 'other_scope/'.

Wanjun0511 commented 5 years ago

facing same problem

semal commented 5 years ago

Got same problem.

fengchangmin666 commented 5 years ago

Got same problem.

Realvincentyuan commented 5 years ago

I am also searching for the parser to parse new raw text and convert it into the format that the model is able to take in. Any reference?

I made it, will update the results later.

zwd13122889 commented 4 years ago

Excuse me. Where does the label_test.txt come from? Man made or machine generated?

LittleSJL commented 4 years ago

Same problem. When i loaded the saved checkpoint to predict on the test set, i got this error message:

ValueError: Assignment map with scope only name dense_37 should map to scope only dense_37/bias. Should be 'scope/': 'other_scope/'.

LittleSJL commented 4 years ago

Same problem. When i loaded the saved checkpoint to predict on the test set, i got this error message:

ValueError: Assignment map with scope only name dense_37 should map to scope only dense_37/bias. Should be 'scope/': 'other_scope/'.

Well, i solved the problem by changing the code 'tf.keras.layers.Dense' to 'tf.layers.dense'

It seems that when adding an additional layer on top of Bert model, using tf.layers.dense would be a better one.