Merged
Conversation
giuseros
reviewed
Oct 28, 2020
| return _impl | ||
|
|
||
|
|
||
| def _expm1(): |
Contributor
There was a problem hiding this comment.
Could you add the docstring describing what this operation is doing?
Contributor
Author
There was a problem hiding this comment.
Okay, I added TF description address
Comment on lines
+791
to
+794
| def _expm1(): | ||
| def _impl(inputs, attr, params, mod): | ||
| lh = get_relay_op("exp")(inputs[0]) | ||
| return get_relay_op("subtract")(lh, tvm.relay.const(1, attr["T"].name)) |
Contributor
There was a problem hiding this comment.
Not entirely sure, but can't you write return lh -1? Isn't there an overload for the - operator?
Contributor
Author
There was a problem hiding this comment.
The operator-can be used, but cannot be written as lh - 1. I replaced subtract with exp_out - tvm.relay.const(1.0).
Contributor
|
LGTM, thanks for addressing my comments! |
Contributor
trevor-m
pushed a commit
to trevor-m/tvm
that referenced
this pull request
Dec 2, 2020
* TF frontend: add expm1 op * TF frontend: add description for expm1 * TF frontend: use overload operator - instead of subtract * TF frontend: Limits the range of input data in the Expm1 test Co-authored-by: xup <xp224797@alibaba-inc.com>
trevor-m
pushed a commit
to trevor-m/tvm
that referenced
this pull request
Dec 4, 2020
* TF frontend: add expm1 op * TF frontend: add description for expm1 * TF frontend: use overload operator - instead of subtract * TF frontend: Limits the range of input data in the Expm1 test Co-authored-by: xup <xp224797@alibaba-inc.com>
trevor-m
pushed a commit
to neo-ai/tvm
that referenced
this pull request
Dec 4, 2020
* TF frontend: add expm1 op * TF frontend: add description for expm1 * TF frontend: use overload operator - instead of subtract * TF frontend: Limits the range of input data in the Expm1 test Co-authored-by: xup <xp224797@alibaba-inc.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to enrich the support of TF operator and the need of practical work, we add expm1 op in tensorflow frontend.
@FrozenGene @srkreddy1238