forked from songjmcn/3DCNN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
structOfConvnet.m
41 lines (38 loc) · 978 Bytes
/
structOfConvnet.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
function [struction] = structOfConvnet(image_shape)
%init convet3d parameters
if nargin==0
image_shape=[60 40 7];
end
struction.inX=image_shape(1);
struction.inY=image_shape(2);
struction.inZ=image_shape(3);
%卷积第一阶段
%卷积核的XYZ
struction.convnetOne.kX=7;
struction.convnetOne.kY=7;
struction.convnetOne.kZ=3;
struction.convnetOne.kNum=2; %卷积核的个数(我们这里使用全连接)
struction.convnetOne.ct=[ 1 1
1 2];
%重采样的窗口长度和步长
struction.convnetOne.sw=2;
struction.convnetOne.ss=2;
%卷积第二阶段
%卷积核
struction.convnetTwo.kX=7;
struction.convnetTwo.kY=6;
struction.convnetTwo.kZ=3;
struction.convnetTwo.kNum=6;
struction.convnetTwo.ct=[ 1 1
2 2
1 3
2 4
1 5
2 6];
%重采样
struction.convnetTwo.sw=3;
struction.convnetTwo.ss=3;
%分类器层
struction.classifier.One=128;
struction.classifier.Two=10;
end