预测代码都在predictors/predict.py中,初始化Predictor对象,调用predict方法即可。
预测代码都在predictors/predict.py中,初始化Predictor对象,调用predict方法即可。
请问这个有例子可以给看看么?
请问,您的运行起来了吗?我的一直报错: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]
请问,您的运行起来了吗?我的一直报错: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重写了文本分类
能分享一下您得代码吗?
能分享一下您得代码吗? 源码不方便发,不过我大概是根据这个改的哈 https://www.tensorflow.org/tutorials/text/text_classification_rnn
请问,您的运行起来了吗?我的一直报错: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,,因为预测时输入是一个句子