Skip to content

Commit

Permalink
fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
a162837 committed Nov 4, 2024
1 parent f99c4a9 commit 3b83367
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/legacy_test/test_clip_tensor_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ def test_dygraph_clip(self):
)
max_data = 5
out_np = np.clip(data, min_data, max_data)
data = paddle.to_tensor(data)
min_data = paddle.to_tensor(min_data)
data = paddle.to_tensor(data, dtype='int32')
min_data = paddle.to_tensor(min_data, dtype='int32')
max_data = paddle.to_tensor([max_data], dtype='int32')
out = paddle.clip(data, min_data, max_data)
np.testing.assert_allclose(out.numpy(), out_np, rtol=1e-05)
Expand Down

0 comments on commit 3b83367

Please sign in to comment.