Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Commit

Permalink
fix bug for plain net
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghang1989 committed Sep 15, 2016
1 parent 8e3a4ab commit 01d2790
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
data/
*.swp
6 changes: 3 additions & 3 deletions init/res_cifar_init.m
Expand Up @@ -12,7 +12,7 @@


opts.networkType = 'resnet'; % 'plain' | 'resnet'
opts.reLUafterSum = false;
opts.reLUafterSum = true;
opts.shortcutBN = false;
opts = vl_argparse(opts, varargin);

Expand Down Expand Up @@ -85,12 +85,12 @@
lName = sprintf('relu%d', info.lastIdx);
end
add_block_conv(net, sprintf('%d', info.lastIdx+1), lName, ...
[w w info.lastNumChannel ch], stride, bn, true);
[w w info.lastNumChannel ch], stride, opts);
info.lastIdx = info.lastIdx + 1;
info.lastNumChannel = ch;
for i=2:2*n,
add_block_conv(net, sprintf('%d', info.lastIdx+1), sprintf('relu%d', info.lastIdx), ...
[w w ch ch], 1, bn, true);
[w w ch ch], 1, opts);
info.lastIdx = info.lastIdx + 1;
end
elseif strcmpi(netType, 'resnet'),
Expand Down
2 changes: 1 addition & 1 deletion res_cifar.m
Expand Up @@ -4,7 +4,7 @@
setup;
opts.modelType = 'resnet' ;
opts.preActivation = false;
opts.reLUafterSum = false;
opts.reLUafterSum = true;
opts.shortcutBN = false;
[opts, varargin] = vl_argparse(opts, varargin) ;

Expand Down

0 comments on commit 01d2790

Please sign in to comment.