Skip to content
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

预测部分代码 #25

Closed
TGLTommy opened this issue May 26, 2022 · 1 comment
Closed

预测部分代码 #25

TGLTommy opened this issue May 26, 2022 · 1 comment

Comments

@TGLTommy
Copy link

你好,请教一下关于预测部分代码实现的问题:
① 根据 train_eval_tagging.py,从中抽取了evaluate() 部分的代码进行修改。
② 在实现predict过程中,由于测试样本没有标签,剔除了bert_tagging.py中关于label相关的代码,在调用create_model()方法时,出现了一些Error,请问在create_model()之前是否需要添加 graph=tf.get_default_graph() ? 还有为啥我的中间输出了一些类似这样的数值:
(?, 40, 768) , (?, 4, 32) ,这里的 ?是不是表示输出有问题?

@zedzx1uv
Copy link

你好,请教一下关于预测部分代码实现的问题: ① 根据 train_eval_tagging.py,从中抽取了evaluate() 部分的代码进行修改。 ② 在实现predict过程中,由于测试样本没有标签,剔除了bert_tagging.py中关于label相关的代码,在调用create_model()方法时,出现了一些Error,请问在create_model()之前是否需要添加 graph=tf.get_default_graph() ? 还有为啥我的中间输出了一些类似这样的数值: (?, 40, 768) , (?, 4, 32) ,这里的 ?是不是表示输出有问题?

您好,可否分享一下预测代码,不胜感激

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants