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

【PIR API adaptor No.294】Migrate RandomAffine to pir #60333

Closed
wants to merge 1 commit into from

Conversation

0x45f
Copy link
Contributor

@0x45f 0x45f commented Dec 25, 2023

PR types

Others

PR changes

Others

Description

尝试在PIR下适配class RandomAffine,但是发现其_apply_image函数中所调用的F.affine无法在静态图下正常组网,也就是说该API无法在静态图下使用,下面的demo可以体现老静态图下的问题:

import paddle
import re
import numpy as np
from PIL import Image

from paddle import base
import paddle.vision.transforms.functional as F

paddle.enable_static()

np_img = (np.random.rand(32, 26, 3) * 255).astype('float32')
tensor_img = F.to_tensor(np_img, data_format='CHW') * 255
tensor_affined_img = F.affine(tensor_img, 45, translate=[0.2, 0.2], scale=0.5, shear=[-10, 10])

具体问题在于静态图的place调用
image

Copy link

paddle-bot bot commented Dec 25, 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.

@0x45f 0x45f changed the title [PIR]Migrate RandomAffine to pir 【PIR API adaptor No.294】Migrate RandomAffine to pir Dec 26, 2023
Copy link

paddle-ci-bot bot commented Jan 4, 2024

Sorry to inform you that 2d51a50's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@0x45f 0x45f closed this Jan 23, 2024
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.

None yet

1 participant