Skip to content

Commit 237ff01

Browse files
authored
API 文档补全Generator (#804)
1 parent a5e9f1c commit 237ff01

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ppsci/arch/gan.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@ class Generator(base.Arch):
182182
>>> use_bns_tuple = ((True, True, True), ) * 3 + ((False, False, False), )
183183
>>> acts_tuple = (("relu", None, None), ) * 4
184184
>>> model = ppsci.arch.Generator(("in",), ("out",), in_channel, out_channels_tuple, kernel_sizes_tuple, strides_tuple, use_bns_tuple, acts_tuple)
185+
>>> batch_size = 4
186+
>>> height = 64
187+
>>> width = 64
188+
>>> input_data = paddle.randn([batch_size, in_channel, height, width])
189+
>>> input_dict = {'in': input_data}
190+
>>> output_data = model(input_dict)
191+
>>> print(output_data['out'].shape)
192+
[4, 1, 64, 64]
185193
"""
186194

187195
def __init__(

0 commit comments

Comments
 (0)