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

Something I don't understand about the structure of alexnet #22

Open
ChenDRAG opened this issue Sep 13, 2019 · 1 comment
Open

Something I don't understand about the structure of alexnet #22

ChenDRAG opened this issue Sep 13, 2019 · 1 comment

Comments

@ChenDRAG
Copy link

nn.Hardtanh(inplace=True),
BinarizeConv2d(int(192*self.ratioInfl), int(384*self.ratioInfl), kernel_size=3, padding=1),

this is a sample code from alexnet binary.py, what i don't understand is since you already binarize the input in

BinarizeConv2d function,

so what is the point of using hardtanh activation?

@masterdezign
Copy link

masterdezign commented Dec 1, 2019

so what is the point of using hardtanh activation?

To approximate sign gradients in the backward pass

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