-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[API compatibility] ignore _stacklevel, make parameter name compatible with input and dim, support paddle.softmax, paddle.Tensor.softmax #74651
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提交成功,感谢你对开源项目的贡献! |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
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.
单独把这个softmax挪出来,我感觉似乎不太合理,这个循环导入问题,还有其他一些解决方式没。
或者tensor目录下面,是不是更合理点
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.
已经放在tensor目录下
|
|
||
| @ParamAliasDecorator({"x": ["input"], "axis": ["dim"]}) | ||
| @ParamIgnoreDecorator([('_stacklevel', 2, int)]) | ||
| def softmax( |
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.
这个装饰器太多了,对性能影响比较大,你可以优化下装饰器的写法,至多走一个装饰器,尽可能减少判断逻辑与分支,每次if else都有损耗
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.
已经合成1个,内部逻辑应该不能再简化了
|
/re-run all-failed |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #74651 +/- ##
==========================================
Coverage ? 94.00%
==========================================
Files ? 5
Lines ? 50
Branches ? 0
==========================================
Hits ? 47
Misses ? 3
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| return args, kwargs | ||
|
|
||
|
|
||
| def ParamIgnoreAndAliasDecorator( |
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.
命名风格与其他的保持统一吧,function采用下划线,class采用驼峰式。你可以下个PR再修改。
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,修改一下
XiaoguangHu01
left a comment
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.
LGTM
|
/re-run all-failed |
… dim, support paddle.softmax, paddle.Tensor.softmax (PaddlePaddle#74651) * ignore _stacklevel, make parameter name compatible with input and dim * import softmax in activation.py * mv paddle/softmax to tensor/softmax; merge two decorators into one * fix pre-commit * fix import path * fix the logic, replace Class with Function
PR Category
User Experience
PR Types
New features
Description
ignore _stacklevel, make parameter name compatible with input and dim, support paddle.softmax, paddle.Tensor.softmax