Skip to content

Commit 7ebdc0b

Browse files
authored
【PPSCI Doc No.21、22】ppsci.arch.LorenzEmbedding、ppsci.arch.LRosslerEmbedding
【PPSCI Doc No.21、22】ppsci.arch.LorenzEmbedding、ppsci.arch.LRosslerEmbedding
2 parents 9ded043 + df96158 commit 7ebdc0b

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

ppsci/arch/embedding_koopman.py

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,25 @@ class LorenzEmbedding(base.Arch):
4848
4949
Examples:
5050
>>> import ppsci
51-
>>> model = ppsci.arch.LorenzEmbedding(("x", "y"), ("u", "v"))
51+
>>> model = ppsci.arch.LorenzEmbedding(
52+
... input_keys=("x", "y"),
53+
... output_keys=("u", "v"),
54+
... input_size=3,
55+
... hidden_size=500,
56+
... embed_size=32,
57+
... drop=0.0,
58+
... mean=None,
59+
... std=None,
60+
... )
61+
>>> x_shape = [8, 3, 2]
62+
>>> y_shape = [8, 3, 1]
63+
>>> input_dict = {"x": paddle.rand(x_shape),
64+
... "y": paddle.rand(y_shape)}
65+
>>> output_dict = model(input_dict)
66+
>>> print(output_dict["u"].shape)
67+
[8, 2, 3]
68+
>>> print(output_dict["v"].shape)
69+
[8, 3, 3]
5270
"""
5371

5472
def __init__(
@@ -209,7 +227,25 @@ class RosslerEmbedding(LorenzEmbedding):
209227
210228
Examples:
211229
>>> import ppsci
212-
>>> model = ppsci.arch.RosslerEmbedding(("x", "y"), ("u", "v"))
230+
>>> model = ppsci.arch.RosslerEmbedding(
231+
... input_keys=("x", "y"),
232+
... output_keys=("u", "v"),
233+
... input_size=3,
234+
... hidden_size=500,
235+
... embed_size=32,
236+
... drop=0.0,
237+
... mean=None,
238+
... std=None,
239+
... )
240+
>>> x_shape = [8, 3, 2]
241+
>>> y_shape = [8, 3, 1]
242+
>>> input_dict = {"x": paddle.rand(x_shape),
243+
... "y": paddle.rand(y_shape)}
244+
>>> output_dict = model(input_dict)
245+
>>> print(output_dict["u"].shape)
246+
[8, 2, 3]
247+
>>> print(output_dict["v"].shape)
248+
[8, 3, 3]
213249
"""
214250

215251
def __init__(

0 commit comments

Comments
 (0)