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

【SCU】【PPSCI Export&Infer No.28】phylstm #1031

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

wwwuyan
Copy link

@wwwuyan wwwuyan commented Nov 26, 2024

PR types

New features

PR changes

OPs

Describe

为phylstm添加export和inference

Copy link

paddle-bot bot commented Nov 26, 2024

Thanks for your contribution!

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


wwwuyan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@wwwuyan wwwuyan closed this Nov 26, 2024
@wwwuyan wwwuyan reopened this Nov 26, 2024
@wwwuyan wwwuyan closed this Nov 26, 2024
@wwwuyan wwwuyan reopened this Nov 26, 2024
@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Nov 26, 2024
Copy link
Collaborator

@HydrogenSulfate HydrogenSulfate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码运行会报错的,还麻烦改完自测一下

Comment on lines +319 to +324
model = ppsci.arch.DeepPhyLSTM(
cfg.MODEL.input_size,
eta.shape[2],
cfg.MODEL.hidden_size,
cfg.MODEL.model_type,
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

红框里的代码也需要加上
image

# initialize solver
solver = ppsci.solver.Solver(
model,
pretrained_model_path=cfg.INFER.pretrained_model_path,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pretrained_model_path=cfg.INFER.pretrained_model_path,
cfg=cfg,

Comment on lines +333 to +335
input_spec = [
{key: InputSpec([None, 1], "float32", name=key) for key in model.input_keys},
]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的形状可以运行evaluate时,在DeepPhyLSTM.forward函数里打印输入的shape得到

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants