We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
作者您好,关于约束解码我有一个问题,请问constraint_decoder为什么只在下面代码条件下使用,希望作者能够解答我的疑问,谢谢!
GDAP/seq2seq/constrained_seq2seq.py
Lines 145 to 152 in f6acafa
The text was updated successfully, but these errors were encountered:
作者您好,关于约束解码我有一个问题,请问constraint_decoder为什么只在下面代码条件下使用,希望作者能够解答我的疑问,谢谢! GDAP/seq2seq/constrained_seq2seq.py Lines 145 to 152 in f6acafa if not self.args.predict_with_generate or prediction_loss_only: return super().prediction_step( model=model, inputs=inputs, prediction_loss_only=prediction_loss_only, ignore_keys=ignore_keys, prefix_allowed_tokens_fn=prefix_allowed_tokens_fn if self.constraint_decoder else None, )
这个就是在预测生成的时候使用一个约束解码,训练过程中是不参与的。
Sorry, something went wrong.
感谢您的回答
No branches or pull requests
作者您好,关于约束解码我有一个问题,请问constraint_decoder为什么只在下面代码条件下使用,希望作者能够解答我的疑问,谢谢!
GDAP/seq2seq/constrained_seq2seq.py
Lines 145 to 152 in f6acafa
The text was updated successfully, but these errors were encountered: