DocEE icon indicating copy to clipboard operation
DocEE copied to clipboard

作者您好,请问如何使用训练好的Checkpoint评估模型

Open yzxx667 opened this issue 1 year ago • 5 comments

Agreement

  • [x] Fill the space in brackets with x to check the agreement items.
  • [ ] Before submitting this issue, I've fully checked the instructions in README.md.
  • [ ] Before submitting this issue, I'd searched in the issue area and didn't find a solved issue that covers my problem.
  • [ ] This issue is about the toolkit itself, not Python, pip or other programming basics.
  • [ ] I understand if I do not check all the agreemnt items above, my issue MAY BE CLOSED OR REMOVED WITHOUT FURTHER EXPLANATIONS.

Problem

您好,我使用PTPCG模型跑了100个epoch,保存了最佳的Checkpoint。现在我想使用这个Checkpoint评估我重新划分后的ChFinAnn数据集(按照论元数量重新划分了一下),应该怎么做呢?

You can reproduce the problem by ...

I have tried ..., but it goes to ...

I have checked the source codes, and the problem may come from ...

Environment

Environment Values
System Windows/Linux
GPU Device
CUDA Version
Python Version
PyTorch Version
dee (the Toolkit) Version

Full Log

Log:

yzxx667 avatar Dec 18 '24 04:12 yzxx667

嗨,感谢您对我们项目的关注~

可以参考这里的代码,使用和训练相似的设置,增加模型导入,跳过训练过程,直接评价:https://github.com/Spico197/DocEE/blob/main/run_dee_task.py#L273-L284

Spico197 avatar Dec 18 '24 04:12 Spico197

你好。我直接将skip_train超参数改为True,然后更换了划分后的新数据集,但是最终评估的结果还是之前训练时保存的评估结果。 image

yzxx667 avatar Dec 18 '24 04:12 yzxx667

请问是还需要修改什么地方吗?

你好。我直接将skip_train超参数改为True,然后更换了划分后的新数据集,但是最终评估的结果还是之前训练时保存的评估结果。 image

yzxx667 avatar Dec 18 '24 04:12 yzxx667

了解了,看起来像是直接输出了之前的结果,没有重新在新数据上推理。重新调用一下dee_task.eval试试看。

https://github.com/Spico197/DocEE/blob/main/dee%2Ftasks%2Fdee_task.py#L854-L861

Spico197 avatar Dec 18 '24 04:12 Spico197

好的,我尝试一下,感谢回复

yzxx667 avatar Dec 18 '24 06:12 yzxx667