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

the abs in forward #30

Open
ckqsars opened this issue Jul 23, 2020 · 2 comments
Open

the abs in forward #30

ckqsars opened this issue Jul 23, 2020 · 2 comments

Comments

@ckqsars
Copy link

ckqsars commented Jul 23, 2020

This work is very interesting and useful.
I have some question about the code.
why do you use the torch.abs(x) in the end of the VGG forward.
In my point, we can use the result of self.reg_layer as the result of model forward.

So, I want to know the reason you use the torch.abs

Thank you very much

@raisinglc
Copy link

Personally, I think the result should be non-negative, so they use torch.abs, although c = sum(y(x)p(x)) where y(x) could be negative. If the output could be negative, it might make the model convergence slow(I guess). Nobody want to see a negative value on a density map, right. Actually, I tried use Relu to replace the abs. Using abs is better than relu. It is interesting for me.

@ckqsars
Copy link
Author

ckqsars commented Sep 28, 2020

Thank you for your help

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