Skip to content

Commit

Permalink
Fixed issue vlfeat#230 with initBias being ignored.
Browse files Browse the repository at this point in the history
  • Loading branch information
lenck committed Apr 15, 2016
1 parent 2487b96 commit 43c9f1f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/imagenet/cnn_imagenet_init.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,17 @@
end
convOpts = {'CudnnWorkspaceLimit', opts.cudnnWorkspaceLimit} ;
net.layers{end+1} = struct('type', 'conv', 'name', sprintf('%s%s', name, id), ...
'weights', {{init_weight(opts, h, w, in, out, 'single'), zeros(out, 1, 'single')}}, ...
'weights', {{init_weight(opts, h, w, in, out, 'single'), ...
ones(out, 1, 'single')*init_bias}}, ...
'stride', stride, ...
'pad', pad, ...
'learningRate', [1 2], ...
'weightDecay', [opts.weightDecay 0], ...
'opts', {convOpts}) ;
if opts.batchNormalization
net.layers{end+1} = struct('type', 'bnorm', 'name', sprintf('bn%s',id), ...
'weights', {{ones(out, 1, 'single'), zeros(out, 1, 'single'), zeros(out, 2, 'single')}}, ...
'weights', {{ones(out, 1, 'single'), zeros(out, 1, 'single'), ...
zeros(out, 2, 'single')}}, ...
'learningRate', [2 1 0.05], ...
'weightDecay', [0 0]) ;
end
Expand Down

0 comments on commit 43c9f1f

Please sign in to comment.