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

[RELAY][OPS]LRN and L2_Normalize #1860

Merged
merged 3 commits into from
Oct 11, 2018

Conversation

siju-samuel
Copy link
Member

@siju-samuel siju-samuel commented Oct 8, 2018

#1799

  • LRN
  • L2_NORM

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 others in the community.

@siju-samuel
Copy link
Member Author

@tqchen @srkreddy1238 @junrushao1994 @MarisaKirisame please review.

The size of the local region to be considered for normalization.

axis : int, optional
input data layout channel axis. default value is 1 for NCHW format
Copy link
Contributor

Choose a reason for hiding this comment

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

Captialize

TVM_ATTR_FIELD(size).set_default(5)
.describe("The size of the local region to be considered for normalization.");
TVM_ATTR_FIELD(axis).set_default(1)
.describe("Input data layout channel axis");
Copy link
Contributor

Choose a reason for hiding this comment

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

Axis of input data layout channel?

Copy link
Contributor

@MarisaKirisame MarisaKirisame left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -383,3 +383,66 @@ def relu(data):
The computed result.
"""
return _make.relu(data)


def lrn(data, size=5, axis=1, bias=2, alpha=.00001, beta=0.75):
Copy link
Member

Choose a reason for hiding this comment

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

idk if it is good or not to use these defaults, but seems only AlexNet-like archs apply lrn somewhere, so it is fine.

@tqchen
Copy link
Member

tqchen commented Oct 9, 2018

l2 normalization is not as common and let us move it to level2

@tqchen tqchen merged commit 6f420e0 into apache:master Oct 11, 2018
FrozenGene pushed a commit to FrozenGene/tvm that referenced this pull request Dec 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants