Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to visualize deep neural network?

1 回表示 (過去 30 日間)
mohammed mahmoud
mohammed mahmoud 2018 年 5 月 13 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I want to draw the model as image.
netD = dagnn.DagNN();
i = 0;
% 64x64 to 32x32
conv_param = struct('f', [4 4 3 64], 'pad', 1, 'stride', 2, 'bias', false);
relu_param = 0.2;
i = i+1; netD = get_Conv_dag(netD, i, 'data', sprintf('x%d',i), conv_param);
i = i+1; netD = get_ReLU_dag(netD, i, sprintf('x%d',i-1), sprintf('x%d',i), relu_param);
% 32x32 to 16x16
conv_param = struct('f', [4 4 64 64*2], 'pad', 1, 'stride', 2, 'bias', false);
bn_param = struct('depth', 64*2, 'epsilon', 1e-5);
[netD, i] = get_Block_CBR( netD, i, conv_param, bn_param,relu_param); % 1
% 16x16 to 8x8
conv_param = struct('f', [4 4 64*2 64*4], 'pad', 1, 'stride', 2, 'bias', false);
bn_param = struct('depth', 64*4, 'epsilon', 1e-5);
[netD, i] = get_Block_CBR( netD, i, conv_param, bn_param,relu_param); % 1
% 8x8 to 4x4
conv_param = struct('f', [4 4 64*4 64*8], 'pad', 1, 'stride', 2, 'bias', false);
bn_param = struct('depth', 64*8, 'epsilon', 1e-5);
[netD, i] = get_Block_CBR( netD, i, conv_param, bn_param,relu_param); % 1
% 4x4 to 1x1
conv_param = struct('f', [4 4 64*8 1], 'pad', 0, 'stride', 2, 'bias', false);
i = i+1; netD = get_Conv_dag(netD, i, sprintf('x%d',i-1), sprintf('x%d',i), conv_param);
i = i+1; netD.addLayer('D_loss', dagnn.Loss('loss', 'logistic'), { sprintf('x%d',i-1),'label'},'logistic');
netD.initParams();
netD.meta.trainOpts = opts.train;

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by