Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RupertLuo

This comment has been minimized.

Copy link

commented Jul 3, 2019

你好,请问模型保存和载入的接口是什么啊?

@BrikerMan

This comment has been minimized.

Copy link
Owner Author

commented Jul 3, 2019

你好,请问模型保存和载入的接口是什么啊?

请看这里 https://github.com/BrikerMan/Kashgari/

@ZhyiXu

This comment has been minimized.

Copy link

commented Jul 23, 2019

请问如何指定GPU训练?

@BrikerMan

This comment has been minimized.

Copy link
Owner Author

commented Jul 23, 2019

请问如何指定GPU训练?

只要安装 tensorflow-gpu 就可以,更多请看 https://github.com/BrikerMan/Kashgari/ 的文档

@weare1team

This comment has been minimized.

Copy link

commented Jul 25, 2019

请问训练好模型用怎么predict呢,具体的代码是什么

@BrikerMan

This comment has been minimized.

Copy link
Owner Author

commented Jul 25, 2019

可以使用 predict 或者 predict_entities API, 文档路径:https://kashgari.bmio.net/api/tasks.labeling/#predict ,建议使用新版本。

@biyahui

This comment has been minimized.

Copy link

commented Aug 2, 2019

出现错误:ZeroDivisionError: Weights sum to zero, can't be normalized是什么原因呢?

@BrikerMan

This comment has been minimized.

Copy link
Owner Author

commented Aug 2, 2019

出现错误:ZeroDivisionError: Weights sum to zero, can't be normalized是什么原因呢?

这个笔记本已经过期,请按照 https://kashgari.bmio.net 重新写一个测试。

@biyahui

This comment has been minimized.

Copy link

commented Aug 7, 2019

谢谢,已经成功了,但是这个预测是不是很慢啊?我打印了下时间2457条数据预测时间花费了511秒,请问这正常吗?

@xmy7216

This comment has been minimized.

Copy link

commented Aug 13, 2019

您好 请问能不能使用自己的实体标签?

@BrikerMan

This comment has been minimized.

Copy link
Owner Author

commented Aug 14, 2019

您好 请问能不能使用自己的实体标签?

可以的,请看这里 https://kashgari-zh.bmio.net/tutorial/text-labeling/#_2

@BrikerMan

This comment has been minimized.

Copy link
Owner Author

commented Aug 14, 2019

谢谢,已经成功了,但是这个预测是不是很慢啊?我打印了下时间2457条数据预测时间花费了511秒,请问这正常吗?

BERT 预测就是慢,可以通过 GPU + TF-Serving 部署方式稍微提高一些。

@xmy7216

This comment has been minimized.

Copy link

commented Aug 15, 2019

您好 请问能不能使用自己的实体标签?

可以的,请看这里 https://kashgari-zh.bmio.net/tutorial/text-labeling/#_2

我想用自己的数据集,并且标注的也不是原来的PER等,也是自己定义的实体标签,数据格式一致后,不用指定实体标签有哪些,程序会自动识别有哪些实体标签是么?

@BrikerMan

This comment has been minimized.

Copy link
Owner Author

commented Aug 15, 2019

对的,你可以指定自己的标签,程序会自动处理。可以参考这里

https://github.com/BrikerMan/Kashgari/blob/8831993ff32efd91ab1689b864f7037310670e84/tests/corpus.py#L61

@xmy7216

This comment has been minimized.

Copy link

commented Aug 15, 2019

对的,你可以指定自己的标签,程序会自动处理。可以参考这里

https://github.com/BrikerMan/Kashgari/blob/8831993ff32efd91ab1689b864f7037310670e84/tests/corpus.py#L61

好的,谢谢您啦,我先自己研究下,后面有问题了再请教您!再次感谢

@xmy7216

This comment has been minimized.

Copy link

commented Aug 19, 2019

对的,你可以指定自己的标签,程序会自动处理。可以参考这里

https://github.com/BrikerMan/Kashgari/blob/8831993ff32efd91ab1689b864f7037310670e84/tests/corpus.py#L61

您好,请问预测出现:(1)实体没有以‘’B-xx"开头,直接就是“I-xx”;(2)实体的多个字的“I-xxx”中间出现“O”截断;(3)实体以“B-labelA”开头,后面却出现“I-labelB”
不知道一般是由什么原因导致的呢?用的是BiLSTM_CRF_Model,为什么会出现这种情况呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.