Skip to content

Conversation

@zhwesky2010
Copy link
Contributor

@zhwesky2010 zhwesky2010 commented Jan 11, 2023

PR types

Function optimization

PR changes

APIs

Describe

  1. 由于机制问题:静态图创建反向append_backward时,会指定创建shape为[1]的gradient,导致0D的梯度无法正常测试,阻碍了其他开发。但这个问题目前不能改,必须要在输出loss由[1]变为[]后才可以改。
  2. 当前使用可行的测试方案,在静态图网络中新增一个.sum()节点,该PR提供了 静态图0D反向测试 的写法示例。
  3. 为存量的100+个0D API补充了 静态图0D反向测试 ,存量问题2个
@paddle-bot
Copy link

paddle-bot bot commented Jan 11, 2023

你的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.

@zhwesky2010 zhwesky2010 force-pushed the add_0D_UT_static branch 2 times, most recently from 4c63038 to e41319c Compare January 11, 2023 14:53
@zhwesky2010 zhwesky2010 changed the title [Zero-Dim] add static graph gradient test method for 0D Tensor input [Zero-Dim] add static gradient test example for 0D Tensor input Jan 11, 2023
@zhwesky2010 zhwesky2010 changed the title [Zero-Dim] add static gradient test example for 0D Tensor input [Zero-Dim] add static gradient UT example for 0D Tensor input Jan 11, 2023
@zhwesky2010 zhwesky2010 force-pushed the add_0D_UT_static branch 3 times, most recently from 0bcfe6b to e6ac6a5 Compare January 12, 2023 14:03
@zhwesky2010 zhwesky2010 changed the title [Zero-Dim] add static gradient UT example for 0D Tensor input [Zero-Dim] add gradient unittest example of 0D Tensor input in static graph Jan 12, 2023
Copy link
Contributor

@jeff41404 jeff41404 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhwesky2010 zhwesky2010 merged commit 5fd115f into PaddlePaddle:develop Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants