-
-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathf12net.m
26 lines (24 loc) · 914 Bytes
/
f12net.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function net = f12net()
net.layers = {} ;
net.layers{end+1} = struct('type', 'conv', ...
'weights', {{0.01*randn(3,3,3,16, 'single'), zeros(1, 16, 'single')}}, ...
'stride', 1, ...
'pad', 0) ;
net.layers{end+1} = struct('type', 'pool', ...
'method', 'max', ...
'pool', [3 3], ...
'stride', 2, ...
'pad', 0) ;
net.layers{end+1} = struct('type', 'relu') ;
net.layers{end+1} = struct('type', 'conv', ...
'weights', {{0.01*randn(5,5,16,16, 'single'), zeros(1, 16, 'single')}}, ...
'stride', 1, ...
'pad', 0) ;
net.layers{end+1} = struct('type', 'relu') ;
net.layers{end+1} = struct('type', 'dropout', 'rate', 0.5) ;
net.layers{end+1} = struct('type', 'conv', ...
'weights', {{0.05*randn(1,1,16,2, 'single'), zeros(1, 2, 'single')}}, ...
'stride', 1, ...
'pad', 0) ;
net.layers{end+1} = struct('type', 'relu') ;
net.layers{end+1} = struct('type', 'softmaxloss') ;