*** 作系统问题或内存不足。
*** 作系统问题,解决方法,存在漏洞或bug,可通过修复漏洞或重装系统来解决。内存不足主要是内存空间溢出,关闭一些程序,或加大内存。
mcca模型是一种新的混合土地利用结构时空动态模拟方法。模型是由中国地质大学地理与信息工程学院,国家GIS工程技术研究中心的高性能空间计算智能实验室。
本人深度学习小白,想用matlab做两组传感器数据的神经网络特征融合,不知道我的想法对不对,我在工具箱里这么编写了一个基于AlexNet的神经网络模型,两组数据经过相同的卷积层,再通过一个additionLayer连接层绑两组数据连接起来,再通过三个全连接层,最后输出三个分类。
代码是通过深度学习工具箱生成的,如下
lgraph = layerGraph();
tempLayers = [
imageInputLayer([227 227 3],"Name","data1")
convolution2dLayer([11 11],96,"Name","conv1_1","BiasLearnRateFactor",2,"Stride",[4 4])
reluLayer("Name","relu1_1")
crossChannelNormalizationLayer(5,"Name","norm1_1","K",1)
maxPooling2dLayer([3 3],"Name","pool1_1","Stride",[2 2])
groupedConvolution2dLayer([5 5],128,2,"Name","conv1_2","BiasLearnRateFactor",2,"Padding",[2 2 2 2])
reluLayer("Name","relu1_2")
crossChannelNormalizationLayer(5,"Name","norm1_2","K",1)
maxPooling2dLayer([3 3],"Name","pool1_2","Stride",[2 2])
convolution2dLayer([3 3],384,"Name","conv1_3","BiasLearnRateFactor",2,"Padding",[1 1 1 1])
reluLayer("Name","relu1_3")
groupedConvolution2dLayer([3 3],192,2,"Name","conv1_4","BiasLearnRateFactor",2,"Padding",[1 1 1 1])
reluLayer("Name","relu1_4")
groupedConvolution2dLayer([3 3],128,2,"Name","conv1_5","BiasLearnRateFactor",2,"Padding",[1 1 1 1])
reluLayer("Name","relu1_5")
maxPooling2dLayer([3 3],"Name","pool1_5","Stride",[2 2])];
lgraph = addLayers(lgraph,tempLayers);
tempLayers = [
imageInputLayer([227 227 3],"Name","data2")
convolution2dLayer([11 11],96,"Name","conv2_1","BiasLearnRateFactor",2,"Stride",[4 4])
reluLayer("Name","relu2_1")
crossChannelNormalizationLayer(5,"Name","norm2_1","K",1)
maxPooling2dLayer([3 3],"Name","pool2_1","Stride",[2 2])
groupedConvolution2dLayer([5 5],128,2,"Name","conv2_2","BiasLearnRateFactor",2,"Padding",[2 2 2 2])
reluLayer("Name","relu2_2")
crossChannelNormalizationLayer(5,"Name","norm2_2","K",1)
maxPooling2dLayer([3 3],"Name","pool2_2","Stride",[2 2])
convolution2dLayer([3 3],384,"Name","conv2_3","BiasLearnRateFactor",2,"Padding",[1 1 1 1])
reluLayer("Name","relu2_3")
groupedConvolution2dLayer([3 3],192,2,"Name","conv2_4","BiasLearnRateFactor",2,"Padding",[1 1 1 1])
reluLayer("Name","relu2_4")
groupedConvolution2dLayer([3 3],128,2,"Name","conv2_5","BiasLearnRateFactor",2,"Padding",[1 1 1 1])
reluLayer("Name","relu2_5")
maxPooling2dLayer([3 3],"Name","pool2_5","Stride",[2 2])];
lgraph = addLayers(lgraph,tempLayers);
tempLayers = [
additionLayer(2,"Name","addition")
fullyConnectedLayer(4096,"Name","fc6","BiasLearnRateFactor",2)
reluLayer("Name","relu6")
dropoutLayer(05,"Name","drop6")
fullyConnectedLayer(4096,"Name","fc7","BiasLearnRateFactor",2)
reluLayer("Name","relu7")
dropoutLayer(05,"Name","drop7")
fullyConnectedLayer(3,"Name","fc8","BiasLearnRateFactor",2)
softmaxLayer("Name","prob")
classificationLayer("Name","classoutput")];
lgraph = addLayers(lgraph,tempLayers);
% 清理辅助变量
clear tempLayers;
lgraph = connectLayers(lgraph,"pool1_5","addition/in1");
lgraph = connectLayers(lgraph,"pool2_5","addition/in2");
figure
plot(lgraph);
layers = lgraphLayers;
复制
画出来的图如下
输入读取处理的代码如下
%% 训练数据存储;
allImages1 = imageDatastore("E:\Data\old-new\CWT\1\",
'IncludeSubfolders',true,
'LabelSource','foldernames');
allImages2= imageDatastore("E:\Data\old-new\CWT\2\",
'IncludeSubfolders',true,
'LabelSource','foldernames');
%% 数据处理;
rng default
[imgsTrain1,imgsValidation1] = splitEachLabel(allImages1,08,'randomized');%按比例拆分 ImageDatastore 标签
disp(['Number of training images: ',num2str(numel(imgsTrain1Files))]);
disp(['Number of validation images: ',num2str(numel(imgsValidation1Files))]);
[imgsTrain2,imgsValidation2] = splitEachLabel(allImages2,08,'randomized');%按比例拆分 ImageDatastore 标签
disp(['Number of training images: ',num2str(numel(imgsTrain2Files))]);
disp(['Number of validation images: ',num2str(numel(imgsValidation2Files))]);
%% 处理输入的;
inputSize = layers(1)InputSize;
augimgsTrain1 = augmentedImageDatastore(inputSize(1:2),imgsTrain1); % 调整图像大小以匹配网络输入层
augimgsValidation1 = augmentedImageDatastore(inputSize(1:2),imgsValidation1);
augimgsTrain2 = augmentedImageDatastore(inputSize(1:2),imgsTrain2); % 调整图像大小以匹配网络输入层
augimgsValidation2 = augmentedImageDatastore(inputSize(1:2),imgsValidation2);
augimgsTrain = combine(augimgsTrain1,augimgsTrain2);
% augimgsValidation = combine(augimgsValidation1,augimgsValidation2);
复制
但是训练时会一直报错,ValidationData设置为空因为我不知道怎么把augimgsValidation1 augimgsValidation2两个结构体的验证集放到一块,‘opts =’ 这行会报错误,所以上面也就注掉了
训练的代码如下
%% 设置参数进行训练
rng default
mbSize = 40;
mxEpochs = 40;
ilr = 1e-4;
plt = 'training-progress';
opts = trainingOptions('sgdm',
'InitialLearnRate',ilr,
'MaxEpochs',mxEpochs ,
'MiniBatchSize',mbSize,
'ValidationData',[],
'ExecutionEnvironment','multi-gpu',
'Plots',plt);
[trainedAN,info2] = trainNetwork(augimgsTrain,layers,opts);
复制
报的错误如下图
有没有会用matlab做深度学习的大佬,帮我看看这个,万分感谢!
深度学习
matlab
神经网络
机器学习
迁移学习
一分钟了解直流变频空调
精选推荐
广告
mcca特征融合matlab代码
78下载·0评论
2019年1月26日
火灾检测基于matlab连通区域+SVM特征融合火灾检测含Matlab源码 1223期
1498阅读·3评论·7点赞
2021年8月17日
总结与归纳:深度神经网络中的数据融合方法
8124阅读·4评论·51点赞
2020年4月9日
基于SIFT特征的图像拼接融合(matlab+vlfeat实现)
12W阅读·6评论·4点赞
2019年4月27日
分类预测 | MATLAB实现CNN卷积神经网络多特征分类预测
1313阅读·0评论·1点赞
2022年9月7日
MATLAB中深度学习的多级神经网络构建
1349阅读·0评论·1点赞
2021年12月17日
灭菌器供应厂家
精选推荐
广告
(Note)神经网络中的特征融合方式(add/concate)
1733阅读·0评论·1点赞
2022年7月19日
在 Matlab 中连接不同大小的数组:此函数允许您连接不同大小的数组,并在需要时使用 NaN 填充。-matlab开发
22下载·0评论
2021年6月1日
MATLAB强化学习工具箱学习笔记--在Simulink环境中训练智能体Create Simulink Environment and Train Agent
3883阅读·8评论·4点赞
2021年11月15日
python将大量拼接千面图_11 图像合成与图像融合
426阅读·0评论·1点赞
2020年12月10日
图像融合方法
3098阅读·1评论·3点赞
2020年11月11日
MATLAB的图像融合设计
1004阅读·1评论·1点赞
2021年8月30日
matlab图像融合sift,基于SIFT特征的图像拼接融合(matlab+vlfeat实现)
403阅读·0评论·0点赞
2021年4月24日
matlab机器学习与人工智能期末课设,基于融合特征的以图搜图应用
209阅读·0评论·1点赞
2022年6月1日
回归预测 | MATLAB实现CNN-GRU(卷积门控循环单元)多输入单输出
2884阅读·1评论·0点赞
2022年4月13日
Matlab之深度学习工作流程
1521阅读·0评论·3点赞
2020年9月29日
Matlab实现CCA多模特征融合
2752阅读·8评论·3点赞
2020年12月30日
Matlab深度学习上手初探
3976阅读·0评论·1点赞
2022年4月10日
(多模态 / 多维度)特征融合
14W阅读·0评论·16点赞
2020年12月2日
去首页
看看更多热门内容
评论4
m0_62482485
赞
兄嘚,这个问题解决了么?
20221024
m0_62482485
赞
兄嘚,这个问题解决了么?
20221024
程序猿_悟空
赞
呵呵
以上就是关于mcca模型为什么闪退全部的内容,包括:mcca模型为什么闪退、为什么接入本地融合网神经就出问题、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)