Im trying to achieve a density map from network output of dimension 20x20x1x50. Here 20x20 is the output map and 50 is the batch size.
The issue is that the value of output X is equal 0.098 across each output matrix..20x20. There is no gaussian shape like density map but a flat similar valued output map 20x20x1x50. The issue is shown in the figure attached. What am i missing here? The euclidean loss for backpropagation is given as:
case {'l2loss'}
res=(c-X);
n=1;
if isempty(dzdy) %forward
Y = sum((res(:).^2))/numel(res);
else
Y_= -1.*(c-X);
Y = 2*single (Y_ * (dzdy / n) );
end