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

Question signed sqrt normalization #1

Open
zhujiem opened this issue Mar 29, 2020 · 1 comment
Open

Question signed sqrt normalization #1

zhujiem opened this issue Mar 29, 2020 · 1 comment

Comments

@zhujiem
Copy link

zhujiem commented Mar 29, 2020

Is it correct to use torch.sqrt(outputs + 1e-5) since outputs may have negative values? Thanks!

https://github.com/dasguptar/bcnn.pytorch/blob/master/bcnn/model.py#L32

outputs = torch.sign(outputs) * torch.sqrt(outputs + 1e-5) # signed square root normalization

@dasguptar
Copy link
Owner

@jimzhu We are taking the output of VGG16 from a RELU layer, so it will be positive. After that, the bilinear product is also going to positive, and we can do regular sqrt.

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