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

Per Layer Ternarization #5

Open
HahTK opened this issue Jun 2, 2017 · 1 comment
Open

Per Layer Ternarization #5

HahTK opened this issue Jun 2, 2017 · 1 comment

Comments

@HahTK
Copy link

HahTK commented Jun 2, 2017

The boolean controlling ternarization in binary.hpp seems to affect all inner_product and conv layers.
That suggests that either all layers are either ternarized or not. Is there a way to ternarize only some layers ?

I'm thinking of creating a new layer type inner_product_twn and conv_twn and revert the original inner_product and conv layers to baseline caffe behavior. Do you see any problems with this approach ?

Also, the alpha and delta are computed separately for each layer correct ?

@fengfu-chris
Copy link
Owner

@HahTK Yes, per layer ternarization is possible when you revise the source file of inner_product layers and cnn layers. One way is to add a parameter that controls whether a layer should be ternarized. In the .prototxt file that defines the network architecture, the true value of the parameters can be defined and be passed to the source files.

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

2 participants