Skip to content

Commit

Permalink
[Frontend][PaddlePaddle] Fix bug in tests for upgrading paddlepaddle …
Browse files Browse the repository at this point in the history
…to 2.4.2 (#14206)

Upgrade paddlepaddle to 2.4.2, and fix 2 bugs in tests
  • Loading branch information
jiangjiajun authored Mar 6, 2023
1 parent e1c2ad1 commit 9b91247
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker/install/ubuntu_install_paddle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ set -e
set -u
set -o pipefail

pip install paddlepaddle==2.4.1
pip install paddlepaddle==2.4.2
5 changes: 2 additions & 3 deletions tests/python/frontend/paddlepaddle/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -1062,8 +1062,7 @@ def __init__(self, api_name):

@paddle.jit.to_static
def forward(self, x, y):
out = paddle.to_tensor([True, True, True])
z = self.func(x, y, out=out)
z = self.func(x, y)
return paddle.cast(z, "int32")

x_shapes = [[128], [8, 20], [4, 20, 3], [2, 3, 8, 8], [2, 3, 3, 9, 9]]
Expand Down Expand Up @@ -1268,7 +1267,7 @@ def __init__(self, perm):

@paddle.jit.to_static
def forward(self, inputs):
inputs = inputs + inputs.size()
inputs = inputs * 2
return paddle.transpose(inputs, perm=self.perm)

input_data = paddle.rand([1, 3, 5, 4, 3], dtype="float32")
Expand Down

0 comments on commit 9b91247

Please sign in to comment.