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

[Dy2Stat & Quantization]Support append customize attributes into op_desc in nn.Layer #33359

Merged
merged 5 commits into from
Jun 9, 2021

Conversation

Aurelius84
Copy link
Contributor

@Aurelius84 Aurelius84 commented Jun 4, 2021

PR types

New features

PR changes

APIs

Describe

1. PR 描述

Support append customize attributes into op_desc in nn.Layer

  • 支持控制流 sub block
  • 支持同一个layer多次调用

此PR是基于layer的hook实现的,经与@军才沟通,量化侧所有的普通API (如paddle.sub)等都会封装成nn.layer对象,因此都可以基于此PR实现op attribute的指定与保存

image

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jun 4, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

python/paddle/fluid/dygraph/layer_hooks.py Outdated Show resolved Hide resolved
python/paddle/fluid/dygraph/layers.py Outdated Show resolved Hide resolved
Copy link
Contributor

@juncaipeng juncaipeng left a comment

Choose a reason for hiding this comment

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

LGTM

@Aurelius84 Aurelius84 merged commit 992d0d9 into PaddlePaddle:develop Jun 9, 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.

2 participants