资源简介
用C实现了MOEAD的基本功能,该功能主要解决多目标优化问题
代码片段和文件信息
function display_network%(A opt_normalize opt_graycolor cols opt_colmajor)
% This function visualizes filters in matrix A. Each column of A is a
% filter. We will reshape each column into a square image and visualizes
% on each cell of the visualization panel.
% All other parameters are optional usually you do not need to worry
% about it.
% opt_normalize: whether we need to normalize the filter so that all of
% them can have similar contrast. Default value is true.
% opt_graycolor: whether we use gray as the heat map. Default is true.
% cols: how many columns are there in the display. Default value is the
% squareroot of the number of columns in A.
% opt_colmajor: you can switch convention to row major for A. In that
% case each row of A is a filter. Default value is false.
warning off all
if ~exist(‘opt_normalize‘ ‘var‘) || isempty(opt_normalize)
opt_normalize= true;
end
if ~exist(‘opt_graycolor‘ ‘var‘) || isempty(opt_graycolor)
opt_graycolor= true;
end
if ~exist(‘opt_colmajor‘ ‘var‘) || isempty(opt_colmajor)
opt_colmajor = false;
end
W=load(‘net.txt‘);
%W=load(‘network.txt‘);
N=W(1);
m=W(2);
n=W(3);
idisplay=20;
index=4+(idisplay-1)*m*n;
for i=1:m
for j=1:n
A(ji)=W(index);
index=index+1;
end
end
% rescale
A = A - mean(A(:));
if opt_graycolor colormap(gray); end
% compute rows cols
[L M]=size(A);
sz=sqrt(L);
buf=1;
if ~exist(‘cols‘ ‘var‘)
if floor(sqrt(M))^2 ~= M
n=ceil(sqrt(M));
while mod(M n)~=0 && n<1.2*sqrt(M) n=n+1; end
m=ceil(M/n);
else
n=sqrt(M);
m=n;
end
else
n = cols;
m = ceil(M/n);
end
array=-ones(buf+m*(sz+buf)buf+n*(sz+buf));
if ~opt_graycolor
array = 0.1.* array;
end
if ~opt_colmajor
k=1;
for i=1:m
for j=1:n
if k>M
continue;
end
clim=max(abs(A(:k)));
if opt_normalize
array(buf+(i-1)*(sz+buf)+(1:sz)buf+(j-1)*(sz+buf)+(1:sz))=reshape(A(:k)szsz)/clim;
else
array(buf+(i-1)*(sz+buf)+(1:sz)buf+(j-1)*(sz+buf)+(1:sz))=reshape(A(:k)szsz)/max(abs(A(:)));
end
k=k+1;
end
end
else
k=1;
for j=1:n
for i=1:m
if k>M
continue;
end
clim=max(abs(A(:k)));
if opt_normalize
array(buf+(i-1)*(sz+buf)+(1:sz)buf+(j-1)*(sz+buf)+(1:sz))=reshape(A(:k)szsz)/clim;
else
array(buf+(i-1)*(sz+buf)+(1:sz)buf+(j-1)*(sz+buf)+(1:sz))=reshape(A(:k)szsz);
end
k=k+1;
end
end
end
array=array‘;
if opt_graycolor
h=imagesc(array‘EraseMode‘‘none‘[-1 1]);
else
h=imagesc(array‘EraseMode‘‘none‘[-1 1]);
end
axis image off
drawnow;
warning on all
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 90112 2018-12-17 11:06 multistep_initialize\Debug\multistep_initialize.exe
文件 359692 2018-12-17 11:06 multistep_initialize\Debug\multistep_initialize.ilk
文件 2190336 2018-12-17 11:06 multistep_initialize\Debug\multistep_initialize.pdb
文件 3687 2015-04-19 05:35 multistep_initialize\multistep_initialize\data_process.h
文件 176658 2018-12-17 11:06 multistep_initialize\multistep_initialize\Debug\main.obj
文件 2482 2018-12-17 11:06 multistep_initialize\multistep_initialize\Debug\multiste.99ED5C3B.tlog\cl.command.1.tlog
文件 40066 2018-12-17 11:06 multistep_initialize\multistep_initialize\Debug\multiste.99ED5C3B.tlog\CL.read.1.tlog
文件 3144 2018-12-17 11:06 multistep_initialize\multistep_initialize\Debug\multiste.99ED5C3B.tlog\CL.write.1.tlog
文件 3150 2018-12-17 11:06 multistep_initialize\multistep_initialize\Debug\multiste.99ED5C3B.tlog\li
文件 5912 2018-12-17 11:06 multistep_initialize\multistep_initialize\Debug\multiste.99ED5C3B.tlog\li
文件 1842 2018-12-17 11:06 multistep_initialize\multistep_initialize\Debug\multiste.99ED5C3B.tlog\li
文件 197 2018-12-17 11:06 multistep_initialize\multistep_initialize\Debug\multiste.99ED5C3B.tlog\multistep_initialize.lastbuildstate
文件 2753 2018-12-17 11:06 multistep_initialize\multistep_initialize\Debug\multistep_initialize.log
文件 510976 2018-12-17 11:06 multistep_initialize\multistep_initialize\Debug\vc120.idb
文件 356352 2018-12-17 11:06 multistep_initialize\multistep_initialize\Debug\vc120.pdb
文件 2850 2015-04-13 03:25 multistep_initialize\multistep_initialize\display_network.m
文件 1569 2015-04-19 21:05 multistep_initialize\multistep_initialize\fd.m
文件 1807 2015-04-03 03:30 multistep_initialize\multistep_initialize\fx.txt
文件 1806 2015-04-19 04:04 multistep_initialize\multistep_initialize\fx0.txt
文件 1806 2015-04-19 05:13 multistep_initialize\multistep_initialize\fx1.txt
文件 1806 2015-04-19 10:25 multistep_initialize\multistep_initialize\fx2.txt
文件 1806 2015-04-19 05:21 multistep_initialize\multistep_initialize\initialize1_fx.txt
文件 1806 2015-04-19 03:49 multistep_initialize\multistep_initialize\initialize_fx.txt
文件 18662412 2015-05-05 21:58 multistep_initialize\multistep_initialize\initialize_net.txt
文件 1576 2015-04-19 21:49 multistep_initialize\multistep_initialize\main.cpp
文件 3708 2015-04-19 21:49 multistep_initialize\multistep_initialize\MOPSO.h
文件 3544 2015-03-30 10:03 multistep_initialize\multistep_initialize\multistep_initialize.vcxproj
文件 1260 2015-03-30 10:03 multistep_initialize\multistep_initialize\multistep_initialize.vcxproj.filters
文件 18662412 2015-04-30 21:58 multistep_initialize\multistep_initialize\net.txt
文件 3686410 2015-04-29 05:27 multistep_initialize\multistep_initialize\net1.txt
............此处省略15个文件信息
- 上一篇:目标检测方法概述.pdf
- 下一篇:质量管理体系标准文件
评论
共有 条评论