Skip to content

[API Compatibility] Add alias for PyLayerContext.saved_tensor()#78589

Merged
zhwesky2010 merged 1 commit intoPaddlePaddle:developfrom
algorithm1832:improvement_saved_tensor
Apr 7, 2026
Merged

[API Compatibility] Add alias for PyLayerContext.saved_tensor()#78589
zhwesky2010 merged 1 commit intoPaddlePaddle:developfrom
algorithm1832:improvement_saved_tensor

Conversation

@algorithm1832
Copy link
Copy Markdown
Contributor

PR Category

User Experience

PR Types

Improvements

Description

  • Add alias attribute PyLayerContext.saved_tensors for method PyLayerContext.saved_tensor()
  • Add test

Used AI Studio

是否引起精度变化

@paddle-bot
Copy link
Copy Markdown

paddle-bot bot commented Apr 4, 2026

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

@paddle-bot paddle-bot bot added the contributor External developers label Apr 4, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@466ed80). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff             @@
##             develop    #78589   +/-   ##
===========================================
  Coverage           ?   100.00%           
===========================================
  Files              ?         1           
  Lines              ?         3           
  Branches           ?         0           
===========================================
  Hits               ?         3           
  Misses             ?         0           
  Partials           ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

z2 = paddle.tanh(input2) + paddle.tanh(input2)
z2.mean().backward()

self.assertTrue(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

可以直接写np.testing.assert_allclose

@zhwesky2010 zhwesky2010 merged commit c204347 into PaddlePaddle:develop Apr 7, 2026
127 of 131 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants