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

感谢项目,帮你捉个虫(应该) #8

Open
Mieluoxxx opened this issue Mar 2, 2024 · 1 comment
Open

感谢项目,帮你捉个虫(应该) #8

Mieluoxxx opened this issue Mar 2, 2024 · 1 comment

Comments

@Mieluoxxx
Copy link

Mieluoxxx commented Mar 2, 2024

我发现你在外面又单独放了一个CAN模块,这可能是为了解决scoreblocks模块单独运行candemo.py时可能会报路径错误。其实我觉得这可能是编码的时候一个bug,按照我下面展示的修改,可以让你不需要单独放置一个CAN模块

  • 在candemo.py

    • 第13行self.params=load_config('./CAN/config.yaml')改为self.params=load_config('./scoreblocks/CAN/config.yaml')
    • 第22行load_checkpoint(self.model,None,'./CAN/checkpoints/demo.pth')改为load_checkpoint(self.model,None,'./scoreblocks/CAN/checkpoints/demo.pth')
  • 在config.yaml中

    • 第39行word_path: './CAN/words_dict.txt' 改为word_path: './scoreblocks/CAN/words_dict.txt'
    • 第78行checkpoint: "./checkpoints/demo.pth"改为checkpoint: "./scoreblocks/checkpoints/demo.pth"

之后在外部运行score.py时,只需要添加python解释器的路径就行

import sys
import os
sys.path.append(os.getcwd()+'/scoreblocks/')
@vkgo
Copy link
Owner

vkgo commented Mar 20, 2024

谢谢,CAN那里是因为之前项目结题比较匆忙,没花时间去解决那里的路径冲突,应该是重复放置了一份代码。不过现在在忙其他科研内容,没时间维护,如果您有空的话可以麻烦单独提交个PR。

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