Skip to content

Add WeightNorm wrapper layer#21276

Closed
seanpmorgan wants to merge 1 commit intotensorflow:masterfrom
seanpmorgan:14070-weight-norm
Closed

Add WeightNorm wrapper layer#21276
seanpmorgan wants to merge 1 commit intotensorflow:masterfrom
seanpmorgan:14070-weight-norm

Conversation

@seanpmorgan
Copy link
Copy Markdown
Member

@seanpmorgan seanpmorgan commented Jul 31, 2018

Adds a wrapper for Weight Normalization as requested in #14070 & #10125 .
Contains optional data dependent initialization for eager execution, and works on both keras.layers and tf.layers

I struggled to figure out where to place this Wrapper, as no other layers in contrib appear to subclass anything from tf.Keras, but going forward I believe this is the direction TF is headed. Please advise if it should go somewhere else (maybe a wrappers module in contrib?)

Collab Example:
https://colab.research.google.com/drive/1nBQSAA78oUBmi9fhnHJ_zWhHq2NXjwIc#scrollTo=au25bSP75hdr

Wrapped graph:
selection_002

@case540 case540 requested a review from sguada July 31, 2018 17:36
@case540 case540 self-assigned this Jul 31, 2018
Copy link
Copy Markdown

@ctrlaltvikas ctrlaltvikas left a comment

Choose a reason for hiding this comment

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

haha. looks good.

Fix spelling..

Fix eager run without data_init
@dalexander
Copy link
Copy Markdown

+1

Can this be reviewed/merged?

@tensorflowbutler
Copy link
Copy Markdown
Member

Nagging Assignee @case540: It has been 105 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

@alexbeloi
Copy link
Copy Markdown

+1

I'm already using this, it would be nice to see it in an official release. Thanks for all the work from contributors and reviewers.

@seanpmorgan
Copy link
Copy Markdown
Member Author

This will be moved to a PR for tensorflow/addons.

Closing for now to stop the nagging, but I'll reference this issue within a couple of weeks.

@seanpmorgan seanpmorgan closed this Dec 7, 2018
@kaczmarj
Copy link
Copy Markdown

a weight normalization wrapper is available in https://github.com/tensorflow/addons/blob/master/tensorflow_addons/layers/wrappers.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants