【matlab】使用alexnet进行特征提取

MATLAB CUDNN_STATUS_EXECUTION_FAILED 问题: 环境: Windows 10 Matlab2018b gpuDevice: GeForce RTX 2080 Ti nvcc --version: Cuda compilation tools, release 10.2, V10.2.89 matlab 运行Deep Learning Toolbox Model for AlexNet Network 代码 报错 net = alexnet layer = 'conv1' channels = 1:36 I = deepDreamIm 阅读详情

1.下载alexnet工具箱
在命令栏输入alexnet,若不报错说明已经安装,若出现错误按照提示去下载工具箱;
下载地址:https://ww2.mathworks.cn/matlabcentral/fileexchange/59133-deep-learning-toolbox-model-for-alexnet-network
(1)需要先注册(十分简单),登陆,下载;
(2)下载完成之后,windows 是无法运行该文件的;
(3)需要打开 matlab,进入到该文件所在的路径,双击运行;(注:需要较久的时间下载安装 alexnet)
2.demo

clear
camera = webcam;
nnet = alexnet;
while true
    picture = camera.snapshot;
    picture = imresize(picture, [227, 227]);
    label = classify(nnet, picture);
    image(picture);
    title(char(label));
end

3.网络结构

>> net = alexnet;
>> net.Layers

ans = 

  25x1 Layer array with layers:

     1   'data'     Image Input                   227x227x3 images with 'zerocenter' normalization
     2   'conv1'    Convolution                   96 11x11x3 convolutions with stride [4  4] and padding [0  0  0  0]
     3   'relu1'    ReLU                          ReLU
     4   'norm1'    Cross Channel Normalization   cross channel n
【深度学习·笔记一】基于Matlab的已训练神经网络Alexnet进行图像识别 电脑环境 电脑系统:macOS Mojave 10.14 Matlab版本:2018b(校园版license) 注意这里一定要是正版Matlab才可以安装各种数据包 CPU:Intel Core i5 低电压版 显卡:Intel HD Graphics 5000 代码 直接上代码!代码很简单的。 net = alexnet; //首先将net定义为alexnet,也可以换成Matlab支持的其他已... 阅读详情

相关推荐

基于Matlab的AlexNet和SVM的异常螺母检测

通过以上步骤,我们可以使用Matlab中的AlexNet和SVM算法实现螺母的异常检测。首先,我们使用AlexNet提取螺母图像的特征,然后使用这些特征训练一个SVM分类器。在我们的异常螺母检测中,我们将使用AlexNet来提取螺母图像的特征。在我们的异常螺母检测中,我们将使用SVM来对螺母特征进行分类,以区分正常螺母和异常螺母。然后,我们可以使用模型的前几个卷积层或全连接层的输出作为螺母图像的特征表示。此外,为了获得更好的检测性能,您可能需要收集更多的样本数据,并进行适当的数据增强和模型调优。

CyberByte的博客 167

使用MATLAB GUI实现AlexNet网络的电器设备识别

在应用程序中,我们定义了图像显示区域、选择图像按钮、结果标签等UI组件,并设置了相应的回调函数。在图像选择按钮的回调函数中,我们加载图像、进行预处理,并将处理后的图像输入到AlexNet模型中进行分类,最后将分类结果显示在结果标签上。在本文中,我们将介绍如何使用MATLAB GUI和AlexNet网络实现电器设备的识别。我们将通过GUI界面加载并运行预训练的AlexNet模型,然后通过输入一张电器设备图像,实现对其进行分类识别。在GUI界面中添加一个按钮或文件选择框,用于选择要进行识别的电器设备图像。

DevScribe的博客 201

基于AlexNet和SVM的异常螺母检测(附Matlab代码)

异常螺母的检测在许多工业应用中起着重要的作用,它可以帮助提高产品的质量和安全性。本文将介绍如何使用AlexNet和支持向量机(SVM)来实现异常螺母的检测,并提供相应的Matlab代码。在完成SVM分类器的训练后,我们可以使用该模型来进行异常螺母的检测。对于新的图像样本,我们首先将其输入到AlexNet模型中提取特征,然后使用训练好的SVM分类器对特征进行分类。这种结合深度学习和传统机器学习的方法可以提高检测的准确性和鲁棒性,适用于许多工业应用中的质量控制任务。函数加载预训练的AlexNet模型。

2301_79331230的博客 144

MATLAB 使用 AlexNet 网络进行步态识别与仿真分析

MATLAB 使用 AlexNet 网络进行步态识别与仿真分析 摘要:本文介绍了使用 MATLAB 深度学习工具箱实现 AlexNet 网络进行步态识别的方法。AlexNet 是一种经典的深度卷积神经网络,包含 5 个卷积层和 3 个全连接层,采用 ReLU 激活函数和 Dropout 技术。文章详细说明了两种应用场景:1) 直接使用预训练模型进行特征提取和分类;2) 通过迁移学习微调网络以适应特定任务。提供了完整的 MATLAB 代码实现,包括数据加载、网络构建、训练和评估过程。实验表明,该方法在步态识别

走向CTO的路上... 832

深度学习工具包 DeepLearningToolbox

深度学习工具包 Deprecation notice. ----- This toolbox is outdated and no longer maintained. There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/) I would suggest you use one of the tools mentioned above rather than use this toolbox. Best, Rasmus. DeepLearnToolbox ================ A Matlab toolbox for Deep Learning. Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data. It is inspired by the human brain's apparent deep (layered, hierarchical) architecture. A good overview of the theory of Deep Learning theory is [Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf) For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng. * [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007) * [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010) * [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011) If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284) ``` @MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012", } ``` Contact: rasmusbergpalm at gmail dot com Directories included in the toolbox ----------------------------------- `NN/` - A library for Feedforward Backpropagation Neural Networks `CNN/` - A library for Convolutional Neural Networks `DBN/` - A library for Deep Belief Networks `SAE/` - A library for Stacked Auto-Encoders `CAE/` - A library for Convolutional Auto-Encoders `util/` - Utility functions used by the libraries `data/` - Data used by the examples `tests/` - unit tests to verify toolbox is working For references on each library check REFS.md Setup ----- 1. Download. 2. addpath(genpath('DeepLearnToolbox')); Example: Deep Belief Network --------------------- ```matlab function test_example_DBN load mnist_uint8; train_x = double(train_x) / 255; test_x = double(test_x) / 255; train_y = double(train_y); test_y = double(test_y); %% ex1 train a 100 hidden unit RBM and visualize its weights rand('state',0) dbn.sizes = [100]; opts.numepochs = 1; opts.batchsize = 100; opts.momentum = 0; opts.alpha = 1; dbn = dbnsetup(dbn, train_x, opts); dbn = dbntrain(dbn, train_x, opts); figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights %% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NN rand('state',0) %train dbn dbn.sizes = [100 100]; opts.numepochs = 1; opts.batchsize = 100; opts.momentum = 0; opts.alpha = 1; dbn = dbnsetup(dbn, train_x, opts); dbn = dbntrain(dbn, train_x, opts); %unfold dbn to nn nn = dbnunfoldtonn(dbn, 10); nn.activation_function = 'sigm'; %train nn opts.numepochs = 1; opts.batchsize = 100; nn = nntrain(nn, train_x, train_y, opts); [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.10, 'Too big error'); ``` Example: Stacked Auto-Encoders --------------------- ```matlab function test_example_SAE load mnist_uint8; train_x = double(train_x)/255; test_x = double(test_x)/255; train_y = double(train_y); test_y = double(test_y); %% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN % Setup and train a stacked denoising autoencoder (SDAE) rand('state',0) sae = saesetup([784 100]); sae.ae{1}.activation_function = 'sigm'; sae.ae{1}.learningRate = 1; sae.ae{1}.inputZeroMaskedFraction = 0.5; opts.numepochs = 1; opts.batchsize = 100; sae = saetrain(sae, train_x, opts); visualize(sae.ae{1}.W{1}(:,2:end)') % Use the SDAE to initialize a FFNN nn = nnsetup([784 100 10]); nn.activation_function = 'sigm'; nn.learningRate = 1; nn.W{1} = sae.ae{1}.W{1}; % Train the FFNN opts.numepochs = 1; opts.batchsize = 100; nn = nntrain(nn, train_x, train_y, opts); [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.16, 'Too big error'); ``` Example: Convolutional Neural Nets --------------------- ```matlab function test_example_CNN load mnist_uint8; train_x = double(reshape(train_x',28,28,60000))/255; test_x = double(reshape(test_x',28,28,10000))/255; train_y = double(train_y'); test_y = double(test_y'); %% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% error rand('state',0) cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer }; cnn = cnnsetup(cnn, train_x, train_y); opts.alpha = 1; opts.batchsize = 50; opts.numepochs = 1; cnn = cnntrain(cnn, train_x, train_y, opts); [er, bad] = cnntest(cnn, test_x, test_y); %plot mean squared error figure; plot(cnn.rL); assert(er<0.12, 'Too big error'); ``` Example: Neural Networks --------------------- ```matlab function test_example_NN load mnist_uint8; train_x = double(train_x) / 255; test_x = double(test_x) / 255; train_y = double(train_y); test_y = double(test_y); % normalize [train_x, mu, sigma] = zscore(train_x); test_x = normalize(test_x, mu, sigma); %% ex1 vanilla neural net rand('state',0) nn = nnsetup([784 100 10]); opts.numepochs = 1; % Number of full sweeps through data opts.batchsize = 100; % Take a mean gradient step over this many samples [nn, L] = nntrain(nn, train_x, train_y, opts); [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.08, 'Too big error'); %% ex2 neural net with L2 weight decay rand('state',0) nn = nnsetup([784 100 10]); nn.weightPenaltyL2 = 1e-4; % L2 weight decay opts.numepochs = 1; % Number of full sweeps through data opts.batchsize = 100; % Take a mean gradient step over this many samples nn = nntrain(nn, train_x, train_y, opts); [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.1, 'Too big error'); %% ex3 neural net with dropout rand('state',0) nn = nnsetup([784 100 10]); nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through data opts.batchsize = 100; % Take a mean gradient step over this many samples nn = nntrain(nn, train_x, train_y, opts); [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.1, 'Too big error'); %% ex4 neural net with sigmoid activation function rand('state',0) nn = nnsetup([784 100 10]); nn.activation_function = 'sigm'; % Sigmoid activation function nn.learningRate = 1; % Sigm require a lower learning rate opts.numepochs = 1; % Number of full sweeps through data opts.batchsize = 100; % Take a mean gradient step over this many samples nn = nntrain(nn, train_x, train_y, opts); [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.1, 'Too big error'); %% ex5 plotting functionality rand('state',0) nn = nnsetup([784 20 10]); opts.numepochs = 5; % Number of full sweeps through data nn.output = 'softmax'; % use softmax output opts.batchsize = 1000; % Take a mean gradient step over this many samples opts.plot = 1; % enable plotting nn = nntrain(nn, train_x, train_y, opts); [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.1, 'Too big error'); %% ex6 neural net with sigmoid activation and plotting of validation and training error % split training data into training and validation data vx = train_x(1:10000,:); tx = train_x(10001:end,:); vy = train_y(1:10000,:); ty = train_y(10001:end,:); rand('state',0) nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax output opts.numepochs = 5; % Number of full sweeps through data opts.batchsize = 1000; % Take a mean gradient step over this many samples opts.plot = 1; % enable plotting nn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally) [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.1, 'Too big error'); ``` [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Java电商秒杀系统性能优化(一)——电商秒杀系统框架回顾

电商秒杀系统框架回顾项目简介外部依赖框架回顾项目要点项目中存在的问题小结 课程是免费的,课程地址如下:SpringBoot搭建电商秒杀项目,课程真的很棒,作者的思路很清晰,建议各位读者可以跟着视频练习一下这个项目; 项目简介 通过SpringBoot快速搭建的前后端分离的电商基础秒杀项目。项目通过应用领域驱动型的分层模型设计方式去完成:用户otp注册、登陆、查看、商品列表、进入商品详情以及倒计时秒...

ghw15221836342的博客 2925

FPGA中参数化SPI接口设计与Verilog实现

SPI(串行外设接口)作为嵌入式系统的核心通信协议,通过全双工、高速率特性在FPGA与Flash、ADC等外设交互中占据重要地位。参数化设计通过抽象时钟极性、数据位宽等可配置维度,采用分层架构实现硬件复用,显著提升开发效率。Verilog实现需重点处理跨时钟域同步和可配置帧结构,结合AXI总线集成与UVM验证方法学,可构建适应工业控制、物联网网关等场景的高可靠SPI解决方案。

ciya3282的博客 692

WINCC8.1工业组态软件安装与授权配置指南

SCADA系统作为工业自动化控制的核心平台,通过实时数据采集与监控实现生产流程可视化。WINCC作为西门子旗舰级组态软件,其8.1版本凭借稳定的运行时环境在汽车制造、流程工业等领域广泛应用。本文从工业控制系统软件安装规范切入,重点解析WINCC8.1与Automation License Manager的协同工作原理,详细说明包括系统环境检查、安装包校验、授权文件配置等关键技术环节。针对工程实施中常见的内存配置不足、授权管理器报错等典型问题,提供经过现场验证的解决方案,特别适用于需要进行产线监控系统升级维护

cqwf95925的博客 853

数学之美 | 图论和网络爬虫

文章目录概述图论网络爬虫分析BFSDFSBFS + DFS参考资料 概述 这篇文章主要给大家介绍一下计算机算法中非常重要的一部分——图论,以及它在生活中的应用——网络爬虫。   图论 离散数学是当代数学的一个重要的分支,也是计算机科学的数学基础。它又包括四个分支,而图论便是其中一支,另外三个分别是:数理逻辑、集合论、近代数学。 图论中的图由一些节点和边构成,比如下面这张图 。 在图论中一个很基础...

小小酥梨的博客 2018

[数学建模][2012年A国赛模拟] 3. 葡萄酒的评价

暑期学校数学建模培训第三次模拟:2012年国赛A题,一道完全统计方面的题目。据老师反映当年有位老师所带领小组取得“全国10佳优秀论文奖”,我们大组搞统计的老师建模能力不行,但其统计理论非常扎实,在此期间给予我们非常大的帮助,十分感谢老师的倾囊相授。我们小组的定位也不在统计方向,主攻物理建模及优化模型,故本次模拟就用SPSS软件简单做了下,还是学到了多元统计的许多知识,达到了本次训练的目的。 ...

Y-puyu 的博客 3万+

DCMTK编译

dcmtk-3.6.4 使用Unicode?dcmtk的编译选项里没有关于Unicode的选项,OFString的接口里明确使用了OFString(char*)作为构造函数参数,所以,我们可以假设不能够自己擅自在CMakeList.txt里增加一行 add_definitions(-DUNICODE -D_UNICODE) 来强制使用Unicode编码。 亲测:加了之后编译不过 void...

C++ 爱好者 make_it_simple888 1244

VS中的C#项目怎样引入另一个项目

场景 在C#项目A中需要引用项目B。 实现 将项目B手动复制到A所在的项目目录下的同一个解决方案中,即与项目A同级的目录下。 在VS中打开项目B,打开解决方案资源管理器--右击解决方案--添加--现有项目 然后找到项目B的.csproj文件打开。 然后看到资源管理器中已经将B添加进来了 点击项目A的引用-右键-添加 将项目下的解决方...

BADAO_LIUMANG_QIZHI的博客 8835

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

cisco any connect 4.4 windows

cisco any connect 4.4 windows 客户端 ''''

上一篇: 3.2 tensorflow实现softmax regression识别手写数字
下一篇: 转载_Alexnet迁移学习
小小白在路上
博客等级 码龄9年 35粉丝 50原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值