如何使用简单的转换器从检查点加载模型?

问题描述 投票:0回答:1

我正在使用简单的转换器库,我刚刚完成模型的训练,现在我想加载它来尝试做出一些预测。但是,我一定做错了什么,因为它不断引发错误。这是我的代码:

from simpletransformers.seq2seq import Seq2SeqModel
model = Seq2SeqModel("marian","outputs/best_model")
print(model)

print(model.predict(["Using AI to Accelerate Scientific Discovery"]))

这是它显示的错误:

ValueError: You must specify a Seq2Seq config    OR     encoder_type, encoder_name, and decoder_name OR                 encoder_type and encoder_decoder_name

我尝试从文档中搜索答案,但找不到任何内容。

python simpletransformers
1个回答
0
投票

问题解决了吗?

© www.soinside.com 2019 - 2024. All rights reserved.