Skip to content

Commit

Permalink
Modify functional api path in sample code.
Browse files Browse the repository at this point in the history
  • Loading branch information
limin2021 committed Oct 25, 2021
1 parent 617a647 commit 753abc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/paddle/incubate/nn/functional/fused_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def fused_feedforward(x,
x = paddle.to_tensor(x_data)
linear1_weight = paddle.to_tensor(linear1_weight_data)
linear2_weight = paddle.to_tensor(linear2_weight_data)
out = paddle.nn.functional.fused_feedforward(x, linear1_weight, linear2_weight)
out = paddle.incubate.nn.functional.fused_feedforward(x, linear1_weight, linear2_weight)
print(out.numpy().shape)
# (1, 8, 8)
"""
Expand Down Expand Up @@ -244,7 +244,7 @@ def fused_multi_head_attention(x,
# required: gpu
import paddle
import paddle.nn.functional as F
import paddle.incubate.nn.functional as F
# input: [batch_size, seq_len, embed_dim]
x = paddle.rand(shape=(2, 4, 128), dtype="float32")
Expand Down

0 comments on commit 753abc5

Please sign in to comment.