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

No weight update due to sign function #6

Open
jonkoi opened this issue Jul 31, 2018 · 3 comments
Open

No weight update due to sign function #6

jonkoi opened this issue Jul 31, 2018 · 3 comments

Comments

@jonkoi
Copy link

jonkoi commented Jul 31, 2018

Hi,

I don't think weights get updated because of the tf.sign function cutting off backprop gradients:

binarized_filters = tf.sign(tiled_filters + expanded_stddev, name="binarized_filters")

i believe this line is needed:

with tf.get_default_graph().gradient_override_map({"Sign": "Identity"}):

@layog
Copy link
Owner

layog commented Aug 13, 2018

Sorry, for the late reply.

Yes, shift_parameters and beta_values are currently not trainable due to tf.sign function. It's mentioned on the bottom of the README.md.

I didn't get time to fix that one but I guess your solution will work, will try and publish the results.

@martinkersner
Copy link

@jonkoi You are right, the implementation is not correct. The first two ABC layers behave only as constant feature extractors and all the learning happens in the last two float fully connected layers.

@RealDataLLC
Copy link

Even with the weight update, it seems to not be learning on any dataset beside MNIST. Did you have success @jonkoi?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants