-
Notifications
You must be signed in to change notification settings - Fork 825
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
Rewrite activation function #5465
Conversation
@@ -0,0 +1,54 @@ | |||
/* | |||
Copyright 2020 The OneFlow Authors. All rights reserved. |
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.
激活函数相关的反向都写到一个文件比如Activation.cpp,不然实在是太多文件了,而且这个PR里面反向的代码基本都一样,可以考虑重构一下,写一个Activation基类,顺便把以前所有的激活函数都基于这个类重构掉,这个不紧急,可以记TODO。
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 failed, removing label automerge |
CI failed, removing label automerge |
…low-Inc/oneflow into rewrite_activation_function
Speed stats:
|
增加silu(swish),mish,softsign,selu 激活函数
进一步对齐torch实现,删除了torch.mish, tensor.mish方法
doctest
暴力单测
selu
silu
mish profile
新版本实现(static下):
原版本拼凑实现:
相比提升2.95倍
api文档
silu profile
新版本实现(static下):
原版本拼凑实现:
autotest