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

【PPSCI Export&Infer No.13】 darcy2d #900

Merged
merged 2 commits into from
May 15, 2024

Conversation

wufei2
Copy link
Contributor

@wufei2 wufei2 commented May 15, 2024

PR types

Others

PR changes

Others

Describe

#788
推理时有警告W0515 17:37:30.157079 45856 gpu_cpu_map_matmul_to_mul_pass.cc:425] matmul op not support broadcast, please check inputs'shape.
但不影响输出结果

Copy link

paddle-bot bot commented May 15, 2024

Thanks for your contribution!

from paddle.static import InputSpec

input_spec = [
{key: InputSpec([None], "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.

形状改成[None,1]就行啦

Suggested change
{key: InputSpec([None], "float32", name=key) for key in model.input_keys},
{key: InputSpec([None, 1], "float32", name=key) for key in model.input_keys},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这样改导出时会报错,貌似是stan激活函数里有个paddle.broadcast_to报错Elements in shape must be 1-D Tensors or integers

Copy link
Collaborator

Choose a reason for hiding this comment

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

这样改导出时会报错,貌似是stan激活函数里有个paddle.broadcast_to报错Elements in shape must be 1-D Tensors or integers

paddle使用2.6或者develop应该不会有这个问题吧?

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.

LGTM

@HydrogenSulfate HydrogenSulfate merged commit 1701459 into PaddlePaddle:develop May 15, 2024
2 of 4 checks passed
huohuohuohuohuo123 pushed a commit to huohuohuohuohuo123/PaddleScience that referenced this pull request Aug 12, 2024
* 【PPSCI Export&Infer No.13】 darcy2d

* Update examples/darcy/darcy2d.py

---------

Co-authored-by: HydrogenSulfate <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants