You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2025-06-08 12:06:59.072995 GPU 3 63652 test begin: paddle.std(Tensor([],"float32"), )
W0608 12:06:59.222908 63652 dygraph_functions.cc:87666] got different data type, run type promotion automatically, this may cause data type been changed.
/root/miniconda3/envs/paddle/lib/python3.12/site-packages/paddle/tensor/stat.py:285: UserWarning: Degrees of freedom is <= 0.
out = var(**locals())
[accuracy error] paddle.std(Tensor([],"float32"), )
Not equal to tolerance rtol=0.01, atol=0.01
Scalars are not close!
Expected 0.0 but got nan.
Absolute difference: nan (up to 0.01 allowed)
Relative difference: inf (up to 0.01 allowed)
ACTUAL: (shape=torch.Size([]), dtype=torch.float32)
nan
DESIRED: (shape=torch.Size([]), dtype=torch.float32)
0.0
2025-06-08 12:06:59.102253 GPU 4 63646 test begin: paddle.std(Tensor([],"float32"), list[], )
W0608 12:06:59.242542 63646 dygraph_functions.cc:87666] got different data type, run type promotion automatically, this may cause data type been changed.
/root/miniconda3/envs/paddle/lib/python3.12/site-packages/paddle/tensor/stat.py:285: UserWarning: Degrees of freedom is <= 0.
out = var(**locals())
[accuracy error] paddle.std(Tensor([],"float32"), list[], )
Not equal to tolerance rtol=0.01, atol=0.01
Scalars are not close!
Expected 0.0 but got nan.
Absolute difference: nan (up to 0.01 allowed)
Relative difference: inf (up to 0.01 allowed)
ACTUAL: (shape=torch.Size([]), dtype=torch.float32)
nan
DESIRED: (shape=torch.Size([]), dtype=torch.float32)
0.0
上述错误中torch的返回结果为0.0,paddle的返回结果为nan。但是通过
importtorchimportnumpyasnpshape1= []
tensor1=torch.tensor([])
print("Torch Tensor 1 shape:", tensor1.shape)
torch_result=torch.std(tensor1)
print("Torch Result shape :", torch_result.shape)
print("Torch Result :", torch_result)
importpaddletensor1=paddle.to_tensor([], dtype='float32')
paddle_result=paddle.std(tensor1)
print("paddle Result shape :", paddle_result.shape)
print("paddle Result :", paddle_result)
np.testing.assert_allclose(torch_result.detach().numpy(), paddle_result.numpy(), rtol=1e-05)
# outputs
Torch Result shape : torch.Size([])
Torch Result : tensor(nan)
paddle Result shape : []
paddle Result : Tensor(shape=[], dtype=float32, place=Place(gpu:0), stop_gradient=True,
nan)
你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.
❌ Your patch status has failed because the patch coverage (50.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Category
Execute Infrastructure
PR Types
Bug fixes
Description
从PaddleAPITest报错:
上述错误中torch的返回结果为0.0,paddle的返回结果为nan。但是通过
测试输出都是正常的。
pcard-67164