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

Ternary #86

Merged
merged 33 commits into from
May 9, 2019
Merged

Ternary #86

merged 33 commits into from
May 9, 2019

Conversation

jamescook106
Copy link
Contributor

Ternarization. Currently still need to do unit tests before can be merged.

@jamescook106 jamescook106 added the feature New feature or request label May 8, 2019
Copy link
Member

@lgeiger lgeiger left a comment

Choose a reason for hiding this comment

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

Cool, Just a few comments:

larq/quantizers.py Outdated Show resolved Hide resolved
larq/quantizers.py Show resolved Hide resolved
larq/quantizers.py Outdated Show resolved Hide resolved
return _ternarize_with_identity_grad(x)

def threshold_twn(self, x):
x_sum = tf.reduce_sum(tf.abs(x))
Copy link
Member

Choose a reason for hiding this comment

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

Do we need a tf.stop_gradient here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am unsure, I briefly looked up the documentation and I don't think we do, but there is a significant chance that I am incorrect

larq/quantizers.py Outdated Show resolved Hide resolved
larq/quantizers.py Outdated Show resolved Hide resolved
larq/quantizers_test.py Outdated Show resolved Hide resolved
@jamescook106
Copy link
Contributor Author

@lgeiger I have responded to all of your review comments, please look at the azure pipeline when you have time

@lgeiger lgeiger merged commit 69c4033 into master May 9, 2019
@lgeiger lgeiger deleted the Ternary branch May 9, 2019 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants