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

Predict #35

Open
rattlesnakey opened this issue Sep 19, 2021 · 2 comments
Open

Predict #35

rattlesnakey opened this issue Sep 19, 2021 · 2 comments

Comments

@rattlesnakey
Copy link

想问下,就是训练好模型以后,怎么用它实现predict来搭起服务呢,有具体的参考code吗?谢谢~

@PingNie1
Copy link
Collaborator

有的呀。也可以参考这个:https://huggingface.co/transformers/training.html

trainer = Trainer(
    model=model,
    args=training_args,
    train_dataset=small_train_dataset,
    eval_dataset=small_eval_dataset,
    compute_metrics=compute_metrics,
)
trainer.evaluate()

@rattlesnakey
Copy link
Author

rattlesnakey commented Sep 24, 2021 via email

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