✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
更多Matlab仿真内容点击👇
智能优化算法 神经网络预测 雷达通信 无线传感器
信号处理 图像处理 路径规划 元胞自动机 无人机 电力系统
⛄ 内容介绍
由 PSO 训练的完全连接的常规自动编码器
⛄ 部分代码
clear all;
clc;
addpath('NEW_PSO','AE');
%% data preparation
original=imread('me_and_my_son.jpg');
original=imresize(original,[150,90]);
x=rgb2gray(original);
Inputs=double(x);
%% network initialization
number_neurons=89;% number of neurons
LB=-10; % lower bands of weights
UB=10; % upperbands of weights
n=10; % number of population
%% training process
[net]=PSO_AE(Inputs,number_neurons,LB,UB,n);
%% Illustration
regenerated=net.code*pinv(net.B');
subplot(121)
imagesc(regenerated);
colormap(gray);
Tc=num2str(net.prefomance);
Tc= ['RMSE = ' Tc];
xlabel('regenerated image')
title(Tc)
subplot(122)
plot(smooth(net.errors,52),'LineWidth',2);
xlabel('iterations')
ylabel('RMSE')
title('loss function behavior')
axis([0 length(net.errors) min(net.errors) max(net.errors)])
grid
⛄ 运行结果
⛄ 参考文献
[1] M. N. Alam, “Particle Swarm Optimization : Algorithm and its Codes in MATLAB Particle Swarm Optimization : Algorithm and its Codes in MATLAB,” no. March, 2016.
[2] Y. Liu, B. He, D. Dong, Y. Shen, and T. Yan, “ROS-ELM: A Robust Online Sequential Extreme Learning Machine for Big Data Analytics,” Proc. ELM-2014 Vol. 1, Algorthims Theor., vol. 3, pp. 325–344, 2015.
[3] H. Zhou, G.-B. Huang, Z. Lin, H. Wang, and Y. C. Soh, “Stacked Extreme Learning Machines.,” IEEE Trans. Cybern., vol. PP, no. 99, p. 1, 2014.
❤️ 关注我领取海量matlab电子书和数学建模资料
❤️部分理论引用网络文献,若有侵权联系博主删除