Skip to content

Conversation

@Turingg
Copy link
Contributor

@Turingg Turingg commented Feb 7, 2024

PR types
Others

PR changes
Docs

Describe
完善 ppsci.arch.LorenzEmbedding 、ppsci.arch.LRosslerEmbedding的示例 ~
任务链接:#686
对此模型的具体应用还不熟悉QVQ,阔以看看能这样写嘛

@HydrogenSulfate

@paddle-bot
Copy link

paddle-bot bot commented Feb 7, 2024

Thanks for your contribution!

@paddle-bot
Copy link

paddle-bot bot commented Feb 7, 2024

❌ The PR is not created using PR's template. You can refer to this Demo.
Please use PR's template, it helps save our maintainers' time so that more developers get helped.

@Turingg Turingg changed the title API 文档补全LorenzEmbedding,RosslerEmbedding 【PPSCI Doc No.21、22】ppsci.arch.LorenzEmbedding、ppsci.arch.LRosslerEmbedding Feb 7, 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.

感谢大佬年前还提交PR,辛苦修改一下

Comment on lines 49 to 51
Returns:
None.
Copy link
Collaborator

Choose a reason for hiding this comment

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

一般class的__init__方法可以不用写Return字段

None.
Examples:
Copy link
Collaborator

Choose a reason for hiding this comment

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

此处不需要添加空行

Comment on lines 57 to 64
... input_keys = ("x", "y"),
... output_keys=("u", "v"),
... input_size = 3,
... hidden_size = 500,
... embed_size = 32,
... drop = 0.0,
... mean = None,
... std = None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

等号用于指定参数时两侧不用加空格

>>> import ppsci
>>> model = ppsci.arch.LorenzEmbedding(("x", "y"), ("u", "v"))
>>> from ppsci.arch.embedding_koopman import LorenzEmbedding
Copy link
Collaborator

Choose a reason for hiding this comment

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

>>> from ppsci.arch.embedding_koopman import LorenzEmbedding可以删除吧

Comment on lines 236 to 263
Returns:
None.
Examples:
>>> import ppsci
>>> model = ppsci.arch.RosslerEmbedding(("x", "y"), ("u", "v"))
>>> from ppsci.arch.embedding_koopman import RosslerEmbedding
>>> model = ppsci.arch.RosslerEmbedding(
... input_keys = ("x", "y"),
... output_keys=("u", "v"),
... input_size = 3,
... hidden_size = 500,
... embed_size = 32,
... drop = 0.0,
... mean = None,
... std = None,
... )
>>> x_shape = [8, 3, 2]
>>> y_shape = [8, 3, 1]
>>> input_dict = {
... "x": paddle.rand(x_shape),
... "y": paddle.rand(y_shape)
... }
>>> output_dict = model(input_dict)
>>> print(output_dict["u"].shape)
[8, 2, 3]
>>> print(output_dict["v"].shape)
[8, 3, 3]
Copy link
Collaborator

Choose a reason for hiding this comment

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

问题同上

[8, 2, 3]
>>> print(output_dict["v"].shape)
[8, 3, 3]
Copy link
Collaborator

Choose a reason for hiding this comment

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

此处空行删除

Copy link
Contributor Author

Choose a reason for hiding this comment

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

改完噜QVQ

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

@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Feb 20, 2024
@luotao1 luotao1 merged commit 7ebdc0b into PaddlePaddle:develop Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor HappyOpenSource 快乐开源活动issue与PR

3 participants