matlab 深度学习

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
原文地址:https://www.cnblogs.com/mtcnn/p/9422757.html