Skip to content

Conversation

@ooooo-create
Copy link
Contributor

@ooooo-create ooooo-create commented Jun 10, 2025

For this failed case

paddle.prod(Tensor([3, 5],"float32"), keepdim=True, )

In paddle, when axis is None, and keepdim is True, it will be a tensor with an element and keep input rank
But for the torch.prod api

if axis is None:
	result = torch.prod(x, dtype = dtype)

it will return a 0 dims Tensor

@paddle-bot
Copy link

paddle-bot bot commented Jun 10, 2025

Thanks for your contribution!

@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Jun 10, 2025
@cangtianhuang
Copy link
Collaborator

@ooooo-create o师傅请修改一下 pr 描述,这个修改是因为什么呀?

@ooooo-create
Copy link
Contributor Author

@ooooo-create o师傅请修改一下 pr 描述,这个修改是因为什么呀?

感谢提醒~,已添加 pr 描述

Copy link
Collaborator

@cangtianhuang cangtianhuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wanghuancoder wanghuancoder merged commit 8776892 into PFCCLab:main Jun 17, 2025
@ooooo-create ooooo-create changed the title [Accuracy diff No.134] Fix accuracy diff for paddle.prod API [Accuracy diff No.50、134] Fix accuracy diff for paddle.prod API Jun 19, 2025
@ooooo-create ooooo-create deleted the fix_prod branch September 29, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants