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

预测代码都在predictors/predict.py中,初始化Predictor对象,调用predict方法即可。 #14

Open
DachuanZhao opened this issue Oct 29, 2019 · 5 comments

Comments

@DachuanZhao
Copy link

预测代码都在predictors/predict.py中,初始化Predictor对象,调用predict方法即可。

请问这个有例子可以给看看么?

@jiayalu123
Copy link

请问,您的运行起来了吗?我的一直报错:tensorflow.python.framework.errors_impl.InvalidArgumentError: Inputs to operation transformer/transformer-1/multi_head_atten/Select of type Select must have the same size and shape. Input 0: [8,100,100] != input 1: [1024,100,100]

@DachuanZhao
Copy link
Author

请问,您的运行起来了吗?我的一直报错:tensorflow.python.framework.errors_impl.InvalidArgumentError: Inputs to operation transformer/transformer-1/multi_head_atten/Select of type Select must have the same size and shape. Input 0: [8,100,100] != input 1: [1024,100,100]

我没用这个repo了,我直接用tf2重写了文本分类

@jiayalu123
Copy link

能分享一下您得代码吗?

@DachuanZhao
Copy link
Author

能分享一下您得代码吗?
源码不方便发,不过我大概是根据这个改的哈
https://www.tensorflow.org/tutorials/text/text_classification_rnn

@Hansen06
Copy link

Hansen06 commented Feb 7, 2020

请问,您的运行起来了吗?我的一直报错:tensorflow.python.framework.errors_impl.InvalidArgumentError: Inputs to operation transformer/transformer-1/multi_head_atten/Select of type Select must have the same size and shape. Input 0: [8,100,100] != input 1: [1024,100,100]

在预测是你可以将batch_size改为1,,因为预测时输入是一个句子

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

3 participants