• 大小: 3KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-05-14
  • 语言: Matlab
  • 标签: 神经网络  matlab  

资源简介

RNN卷积神经网络,LSTM,是使用matlab实现的,简单的模拟。欢迎大家来下载。

资源截图

代码片段和文件信息

function [train_datatest_data]=LSTM_data_process()
%% 数据加载并完成初始归一化
train_data_initial= [0.4413 0.4707 0.6953 0.8133 0.4379 0.4677 0.6981 0.8002 0.4517 0.4725 0.7006 0.8201;
                     0.4379 0.4677 0.6981 0.8002 0.4517 0.4725 0.7006 0.8201 0.4557 0.4790 0.7019 0.8211;
                     0.4517 0.4725 0.7006 0.8201 0.4557 0.4790 0.7019 0.8211 0.4601 0.4911 0.7101 0.8298]‘;
% train_data_initial=[ 0.4413 0.4707 0.6953 0.8133;
%                      0.4379 0.4677 0.6981 0.8002;
%                      0.4517 0.4725 0.7006 0.8201;
%                      0.4557 0.4790 0.7019 0.8211;
%                      0.4601 0.4811 0.7101 0.8298;
%                      0.4612 0.4845 0.7188 0.8312]‘;
test_data_initial=[0.4557 0.4790 0.7019 0.8211;
                   0.4612 0.4845 0.7188 0.8312;
                   0.4601 0.4811 0.7101 0.8298;
                   0.4615 0.4891 0.7201 0.8330]‘;

data_length=size(train_data_initial1);            %每个样本的长度
data_num=size(train_data_initial2);               %样本数目  

%%归一化过程
for n=1:data_num
    train_data(:n)=train_data_initial(:n)/sqrt(sum(train_data_initial(:n).^2));  
end
for m=1:size(test_data_initial2)
    test_data(:m)=test_data_initial(:m)/sqrt(sum(test_data_initial(:m).^2));
end

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-11-30 16:53  LSTM_MY_updata_to_precise\
     文件        1301  2016-10-08 12:12  LSTM_MY_updata_to_precise\LSTM_data_process.m
     文件        6071  2016-10-12 15:18  LSTM_MY_updata_to_precise\LSTM_mian.m
     文件        4544  2016-10-11 16:01  LSTM_MY_updata_to_precise\LSTM_updata_weight.m

评论

共有 条评论