Skip to content

Conversation

@zrr1999
Copy link
Contributor

@zrr1999 zrr1999 commented Jul 22, 2025

weight 需要满足和为一。

softmax=False 时需要按照文档要求对输入手动进行softmax操作。
因为 torch tensor 自带了 softmax,所以只paddle的输入进行 softmax操作。

PyTorch 的对应 API 不支持使用 soft_label时添加weight,需要手动实现对齐 Paddle。

@paddle-bot
Copy link

paddle-bot bot commented Jul 22, 2025

Thanks for your contribution!

@zrr1999 zrr1999 changed the title [WIP] [Accuracy diff No.115] support softmax=False and weight != None for cross_entropy [Accuracy diff No.115] support softmax=False and weight != None && soft_label==True for cross_entropy Jul 22, 2025
@zrr1999 zrr1999 requested a review from cangtianhuang July 23, 2025 03:45
@cangtianhuang cangtianhuang self-assigned this Jul 23, 2025
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

@cangtianhuang cangtianhuang merged commit 81e9f10 into PFCCLab:main Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants