Bayesian-Crowd-Counting icon indicating copy to clipboard operation
Bayesian-Crowd-Counting copied to clipboard

the abs in forward

Open ckqsars opened this issue 4 years ago • 2 comments

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

ckqsars avatar Jul 23 '20 07:07 ckqsars

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.

raisinglc avatar Sep 27 '20 07:09 raisinglc

Thank you for your help

ckqsars avatar Sep 28 '20 03:09 ckqsars