Matconvnet output of deep network's marix is uniform valued instead of varying values?

扶醉桌前 提交于 2020-02-27 13:05:24

问题


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

回答1:


Found the solution at https://github.com/vlfeat/matconvnet/issues/313. Query conv.var(i).value to see where the value falls, and edit that layer in the conv net. In my case I had to change biases of the conv layers

net2.params(8).value= 0.01*init_bias*ones(1, 128, 'single');%'biases',



来源:https://stackoverflow.com/questions/46463853/matconvnet-output-of-deep-networks-marix-is-uniform-valued-instead-of-varying-v

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!