spiking_relu_conversion icon indicating copy to clipboard operation
spiking_relu_conversion copied to clipboard

"previous_factor" may has a error

Open edwardzcl opened this issue 6 years ago • 0 comments

The file "normalize_nn_data.m" and "normalize_cnn_data.m" have the code such as : for l = 1 : numel(nn.size)-1 % Find the max and rescale weight_max = max(max(max(0, nn.W{l}))); activation_max = max(max(max(0, nn.a{l+1}))); scale_factor = max(weight_max, activation_max); applied_inv_factor = scale_factor / previous_factor; nn.W{l} = nn.W{l} / applied_inv_factor; factor_log(l) = 1 / applied_inv_factor; previous_factor = applied_inv_factor; end

or for ii = 1 : numel(net.layers{l - 1}.a) for j = 1 : numel(net.layers{l}.a) net.layers{l}.k{ii}{j} = ... net.layers{l}.k{ii}{j} / current_factor; end end factor_log(l) = 1 / current_factor; previous_factor = current_factor;

So,the previous_factor equals to the applied_inv_factor or current_factor, rather than the scale_factor as in the paper.

edwardzcl avatar Dec 24 '18 14:12 edwardzcl