-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Relay/TOPI][Op] Add variance and layer norm op #3700
Conversation
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
@kevinthesun @masahi please help to take a look. |
python/tvm/relay/op/nn/nn.py
Outdated
The axis that should be normalized, typically the axis of the channels. | ||
|
||
epsilon : double, optional, default=1e-5 | ||
Small float added to variance to avoid diving by zero. |
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.
dividing
python/tvm/relay/op/reduce.py
Outdated
The input data | ||
|
||
axis : None or int or tuple of int | ||
Axis or axes along which a mean operation is performed. |
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.
mean -> variance
python/tvm/relay/op/reduce.py
Outdated
|
||
axis : None or int or tuple of int | ||
Axis or axes along which a mean operation is performed. | ||
The default, axis=None, will find the indices of minimum element all of the elements of |
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.
all of -> of all
python/tvm/relay/op/reduce.py
Outdated
The input data | ||
|
||
axis : None or int or tuple of int | ||
Axis or axes along which a mean operation is performed. |
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.
mean -> standard deviation
python/tvm/relay/op/reduce.py
Outdated
|
||
axis : None or int or tuple of int | ||
Axis or axes along which a mean operation is performed. | ||
The default, axis=None, will find the indices of minimum element all of the elements of |
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.
of all
python/tvm/relay/op/reduce.py
Outdated
|
||
axis : None or int or tuple of int | ||
Axis or axes along which a mean operation is performed. | ||
The default, axis=None, will find the indices of minimum element all of the elements of |
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.
of all
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 are some typo issues but otherwise looks good.
Thanks @masahi . The docs are updated. |
thanks @icemelon9 @junrushao1994 this is merged. |
* Add LayerNorm op * update * fix * Add mean_std and mean_variance * add std and update doc * add license * x * lint * x * fix * fix doc
* Add LayerNorm op * update * fix * Add mean_std and mean_variance * add std and update doc * add license * x * lint * x * fix * fix doc
Thanks for contributing to TVM! Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers.
@junrushao1994 @kevinthesun Could you have help review?