未验证 提交 20db5221 编写于 作者: K Kevin吴嘉文 提交者: GitHub

Remove redundant numpy import (#47483)

上级 4325da39
......@@ -947,7 +947,6 @@ def fused_multi_transformer(
# required: gpu
import paddle
import paddle.incubate.nn.functional as F
import numpy as np
# input: [batch_size, seq_len, embed_dim]
x = paddle.rand(shape=(2, 4, 128), dtype="float32")
......
......@@ -1171,7 +1171,6 @@ class MaxUnPool1D(Layer):
import paddle
import paddle.nn.functional as F
import numpy as np
data = paddle.rand(shape=[1, 3, 16])
pool_out, indices = F.max_pool1d(data, kernel_size=2, stride=2, padding=0, return_mask=True)
......@@ -1351,7 +1350,6 @@ class MaxUnPool3D(Layer):
import paddle
import paddle.nn.functional as F
import numpy as np
data = paddle.rand(shape=[1, 1, 4, 4, 6])
pool_out, indices = F.max_pool3d(data, kernel_size=2, stride=2, padding=0, return_mask=True)
......
......@@ -70,7 +70,6 @@ class Adagrad(Optimizer):
.. code-block:: python
import paddle
import numpy as np
inp = paddle.rand(shape=[10, 10])
linear = paddle.nn.Linear(10, 10)
......
......@@ -105,7 +105,6 @@ class L2Decay(fluid.regularizer.L2Decay):
# Example1: set Regularizer in optimizer
import paddle
from paddle.regularizer import L2Decay
import numpy as np
linear = paddle.nn.Linear(10, 10)
inp = paddle.rand(shape=[10, 10], dtype="float32")
out = linear(inp)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册