Bayesian-Crowd-Counting
Bayesian-Crowd-Counting copied to clipboard
the abs in forward
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
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.
Thank you for your help