Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【PaddlePaddle Hackathon】40. 在 Paddle 中新增 paddle.nn.UpsamplingBilinear2D 的测试用例 #274

Conversation

OccupyMars2025
Copy link
Contributor

PR types
Others

PR changes
add framework/api/nn/test_upsampling_bilinear_2d.py

Describe
Task: PaddlePaddle/Paddle#35965
用numpy重新实现paddle.nn.UpsamplingBilinear2D的功能,增加了测试case

kolinwei
kolinwei previously approved these changes Oct 27, 2021
data_format = "MCHW"
obj.exception(
etype=ValueError, mode="python", data=x, size=size, scale_factor=scale_factor, data_format=data_format
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

补充size与scale_factor都设置情况下的case。参考文档"size 和 scale_factor 至少要设置一个。 size 的优先级高于 scale_factor "

Copy link
Contributor Author

Choose a reason for hiding this comment

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

当size和scale_factor都设置时,会报错:
ValueError: Only one of size or scale_factor should be defined.
所以我只在最后又增加了一个exception case

OccupyMars2025 and others added 2 commits October 28, 2021 10:31
add one more exception case: " ValueError: Only one of size or scale_factor should be defined."
@DDDivano DDDivano merged commit c77d728 into PaddlePaddle:develop Nov 2, 2021
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.

3 participants