BrikerMan/Kashgari

[Question] Errors of Bi_LSTM classification model when using TF 2.4.1 and kashgari 2.0.1

Harrypeas opened this issue · 2 comments

You must follow the issue template and provide as much information as possible. otherwise, this issue will be closed.
请按照 issue 模板要求填写信息。如果没有按照 issue 模板填写,将会忽略并关闭这个 issue

Check List

Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.

You can post pictures, but if specific text or code is required to reproduce the issue, please provide the text in a plain text format for easy copy/paste.

Environment

  • OS [Linux]:
  • Python Version:3.8.5
  • requirements.txt:tensorflow 2.4.1, kashgari 2.0.1
[Paste requirements.txt file here]

Question

I'm trying to create a Chinese text classification model (BiLSTM) by following the tutorial. I have two environments, one is tensorflow1.5 on my MacBook, and the other one is tensorflow2.4.1 and kashgari2.0.1 on my linux server. On my MacBook, the model works well and the accuracy achieves 99% in the first epoch. However, the model on the server performs bad, its loss is decreasing at the first (the minimum is about 0.5), then it starts to grow (the maximum is about 3.0), and finally it decreases slowly. Besides, there has some other errors in my model, for example, I set the sequence length to 512 but the message in the figure shows that it is None. I know that tutorial is more applicable for tensorflow1.X, so I would like to if there any problems in my code.
截屏2021-03-02 上午10 55 10
截屏2021-03-02 上午10 56 20

Please retry it with the latest version.

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.