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

[Cleanup][B-2] clean some paddle.base.dygraph.to_variable for test #61904

Merged
merged 11 commits into from
Feb 23, 2024
Prev Previous commit
refine doc style
  • Loading branch information
SigureMo committed Feb 22, 2024
commit 02d38cf954fb9fee39f29974c0fdff8889ac5587
19 changes: 10 additions & 9 deletions test/dygraph_to_static/simnet_dygraph_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,16 @@ class FC(paddle.nn.Layer):

Examples:
.. code-block:: python
import paddle
import paddle.base as base
from paddle.base.dygraph import FC
import numpy as np
data = np.random.uniform(-1, 1, [30, 10, 32]).astype('float32')
with base.dygraph.guard():
fc = FC("fc", 64, num_flatten_dims=2)
data = paddle.to_tensor(data)
conv = fc(data)

import paddle
import paddle.base as base
from paddle.base.dygraph import FC
import numpy as np
data = np.random.uniform(-1, 1, [30, 10, 32]).astype('float32')
with base.dygraph.guard():
fc = FC("fc", 64, num_flatten_dims=2)
data = paddle.to_tensor(data)
conv = fc(data)
"""

def __init__(
Expand Down