0. 超参的定义

超参的定义直接使用结构体

opts.alpha = 1;
opts.batchsize = 50;
opts.numepoch = 5;

1. Autoencoder

2. 网络结构的定义(使用结构体与元祖的基本形式)

% 6c-2s-12c-2s 的 cnn
cnn.layers = {
    struct('type', 'i')
    struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5)
    struct('type', 's', 'scale', 2)
    struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5)
    struct('type', 's', 'scale', 2)
};

for layer = 1:numel(cnn.layers):
    % 遍历每一层;
    ...
end
posted on 2016-11-17 11:12  未雨愁眸  阅读(574)  评论(0编辑  收藏  举报