CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
【PIR API adaptor No.15-17】 Migrate RandomHorizontalFlip、RandomVerticalFlip、RandomErasing into pir #65499
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
PR 描述里请关联下具体的任务 issue |
@@ -698,7 +698,7 @@ def central_crop(width, height): | |||
) | |||
|
|||
def _apply_image(self, img): | |||
if paddle.in_dynamic_mode(): | |||
if paddle.framework.in_dynamic_or_pir_mode(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
历史任务见 #48612
这里的 in_dynamic_mode
为的是消弭动静之间的差异的,不是为了消弭新老 IR 的差异的,PIR 也应该走静态图分支
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
done |
@@ -797,7 +812,7 @@ def __init__( | |||
self.prob = prob | |||
|
|||
def _apply_image(self, img): | |||
if paddle.in_dynamic_mode(): | |||
if paddle.framework.in_dynamic_or_pir_mode(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这样 PIR 走的动态图分支吧?没问题吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
本地测出来没问题,现在看起来像是底层兼容了,如果走静态分支我目前提的这种该法也行,不会触发File "/home/cmcandy/code/PD/Paddle/build/python/paddle/pir/math_op_patch.py", line 475, in bool
raise TypeError(
TypeError: bool(Value) is not supported in static graph mode. If you are using @to_static, you can try this:
- If you want to get the value of Value, you can switch to non-fullgraph mode by setting @to_static(full_graph=True).
- If you want to run it in full graph mode, you need use Value.astype(paddle.bool), and do not use bool(Value).
这里的TypeError
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不是说单测不挂就没问题,逻辑上是有问题的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯,已经改过来了
可以帮忙看看PR-CI-Coverage这个嘛,我有些疑惑为什么Cover不到,本地测了一下相关的test(test_transforms_static.py)是会调用改动的地方 |
Sorry to inform you that 5a91560's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…lFlip、RandomErasing into pir (PaddlePaddle#65499) --------- Co-authored-by: SigureMo <sigure.qaq@gmail.com>
…lFlip、RandomErasing into pir (PaddlePaddle#65499) --------- Co-authored-by: SigureMo <sigure.qaq@gmail.com>
PR Category
Execute Infrastructure
PR Types
Improvements
Description
Migrate RandomHorizontalFlip、RandomVerticalFlip、RandomErasing into pir
1.将RandomHorizontalFlip, RandomVerticalFlip, RandomErasing迁移到pir中
2.修复RandomResizedCrop在pir模式下_static_get_param函数无法直接进行比值问题
3.完善test_transforms_static.py的测试
Related links
PCard-66972