乐鑫esp-idf的搭建

乐鑫ESP-IDF环境搭建:从手动到自动的避坑指南 本文详细介绍了乐鑫ESP-IDF开发环境的搭建过程,从手动安装的常见问题到自动化工具的便捷使用。针对网络访问、依赖项配置等痛点提供实用解决方案,帮助开发者快速搭建稳定的ESP32开发环境,特别适合从Arduino转向ESP-IDF的开发者参考。 阅读详情
AI摘要

博主此前用arduino编写esp8266,因尝试esp32系列的s3,决定搭建esp-idf开发环境。介绍了乐鑫官网、组件案例及芯片开发文档链接。详细讲述了下载esp-idf的过程,包括手动和自动安装方式,手动安装遇诸多问题,最终自动安装编译成功。

1.以前一直用arduino来编写esp8266,由于最近想尝试esp32系列的s3,所以决定搭建esp-idf的开发环境

#这个是乐鑫官网,Wireless SoCs, Software, Cloud and AIoT Solutions | Espressif SystemsEspressif is a global high-tech leader in wireless communication, IoT, AI SoCs, software, and solutions, for a smarter and greener future.https://www.espressif.com.cn/enhttps://www.espressif.com.cn/en

观望中看到一系列的解决方案,都大概点开看了一眼

#这个是乐鑫的组件和案例,先看一眼

ESP Component RegistryESP Component Registryhttps://components.espressif.com/https://components.espressif.com/#下面这个是对应的芯片开发文档


 

ESP-IDF Getting Started | Espressif SystemsESP-IDF is Espressif’s official IoT Development Framework for the ESP32, ESP32-S and ESP32-C series of SoCs. It provides a self-sufficient SDK for any generic application development on these platforms, using programming languages such as C and C++. ESP-IDF currently powers millions of devices in the field, and enables building a variety of network-connected products, ranging from simple light bulbs and toys to big appliances and industrial devices.https://idf.espressif.com/https://idf.espressif.com/#这回由于要使用S3,所以这个是S3的开发文档

API 参考 - ESP32-S3 - — ESP-IDF 编程指南 v5.4 文档https://docs.espressif.com/projects/esp-idf/zh_CN/v5.4/esp32s3/api-reference/index.htmlhttps://docs.espressif.com/projects/esp-idf/zh_CN/v5.4/esp32s3/api-reference/index.html大概介绍就这些了,需要用的时候找对应的链接

2.下载esp-idf

有个尴尬的事,乐鑫居然把代码全部放在github上,这事是挺专业,就是访问起来要刷好几遍,看运气,实在不行就那啥吧,他X的github

https://github.com/espressif/esp-idf?tab=readme-ov-filehttps://github.com/espressif/esp-idf?tab=readme-ov-filehttps://github.com/espressif/esp-idf?tab=readme-ov-file

下载后解压缩,我放在了c盘【这里提示,下载的不可以用,还是直接建立仓库才行,后面会讲怎么建立,路径位置一致】

里面有安装脚本,本人是windows系统,所以直接执行install.bat就行

打开cmd,执行

然后再运行export.bat

这么搞有个前提是需要安装有git

Git - Downloading Packagehttps://git-scm.com/downloads/winhttps://git-scm.com/downloads/win

然后python要升级,

再下来,手工命令行安装,会要去github下载,他X的,后面我试试自动安装

每次碰到这种事,就突然觉得马斯克很牛逼,很佩服那位钢铁侠

下载贼长贼慢,我这么试试看,完事后准备自动安装吧。太慢了,辣鸡

安装成功

再执行export.bat

测一下

cd C:\esp-idf-master\esp-idf-master\examples\get-started\hello_world

自带了一个hellowrold

idf.py build

这时候就会碰到提示

这个就是因为不是通过git建立的,直接下载了zip还不行,所以重新来过。

git clone --recursive https://github.com/espressif/esp-idf.git C:\esp-idf-master\esp-idf-master

然后再试一次编译

这回终于成功编译了

#关于卸载,

删除目录就行了

方法二,官方提供了一个安装工具,这个挺好啊,我试了试,用这个也可以安装

Windows 平台工具链的标准设置 - ESP32 - — ESP-IDF 编程指南 latest 文档https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/get-started/windows-setup.htmlhttps://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/get-started/windows-setup.html

然后下载,我选择了V5.4,安装包太大啦

安装完成,跳出来集成环境的cmd

直接编译,成了,太简单了,还是自动安装靠谱。哈哈哈哈

ESP32-S3-WROOM-1-N16R8模组深度解析:大存储配置、PSRAM实战与量产避坑指南 在嵌入式AIoT产品开发中,存储资源的规划往往决定系统性能的上限。Flash用于承载固件与资源文件,而PSRAM则直接影响图形界面、音频缓冲及AI推理等场景的运行流畅度。理解二者在内存架构中的分工与协作原理,是进行高效硬件选型的基础。大容量存储的价值在带屏交互、离线语音和边缘计算等应用中尤为突出,它们需要充足的缓存空间来避免频繁的I/O调度。ESP32-S3-WROOM-1-N16R8正是面向这类需求的高配模组,其16MB Flash与8MB Octal PSRAM的组合,为解决复杂工程问题提供了充裕的硬件 阅读详情

相关推荐

[ESP系列]乐鑫ESP32开发环境搭建 vscode + esp-idf插件

不得不说,这是一个蛋疼的过程,我尽量简单点 完整地git clone代码 git安装,此处不表,默认大家都懂 众所周知的原因,不要直接用github下载,建议使用gitee 比如在esp32目录下,右键单击git bash 出现如下命令行 执行以下命令获得esp-gitee-tools git clone https://gitee.com/EspressifSystems/esp-gitee-tools.git 执行以下命令获得esp-idf git clone https://gitee.com/E

江东风又起 2928

使用一键安装工具快速搭建 ESP-IDF 开发环境 (Windows)

我们收到用户对 ESP-IDF SDK 软件开发环境感到搭建难、门槛高的反馈。为解决用户在此方面的问题。为此,我们推出本期教程介绍在 Windows 操作系统下使用一键安装工具快速搭建 ESP-IDF 开发环境。您可以观看下面的教程视频,也可以阅读接下来本篇的图文教程。【乐鑫教程】|使用一键安装工具快速搭建 ESP-IDF 开发环境 (Windows)提示:推荐使用系统:64 bit Windows 10 及以上。在进行开发环境搭建时请暂时关闭电脑端杀毒软件避免误删文件。

乐鑫 Espressif 4713

别再折腾VSCode了!用乐鑫官方ESP-IDF v2.4.2完整搭建ESP32开发环境(附网盘资源)

本文详细介绍了如何高效搭建ESP32官方开发环境(ESP-IDF v2.4.2)并解决项目迁移难题。通过乐鑫官方Espressif IDE工具链,开发者可避免常见配置错误,实现从第三方平台到官方IDE的平滑过渡,提升开发效率。文章还提供了版本选择策略、编译系统适配技巧及高级调试方法,助力物联网开发。

weixin_30566111的博客 274

【WiFi模组】乐鑫ESP32 基于ESP-IDF的原生SDK二次开发

乐鑫ESP32,属于一种片上开发,现就Windows下搭建其SDK环境及遇到的问题进行记录。

徐腾腾的博客 4982

ESP32学习笔记一之开发环境搭建

ESP32的官方网站在github上提供的详细的开发环境搭建步骤:https://docs.espressif.com/projects/esp-idf/zh_CN/latest/ ESP32开发板在淘宝上随便买一个就可以了,功能上大同小异。 开发准备 硬件准备 ESP32开发板一块,带USB转串口 高质量USB线一根,带载大于1A 搭载可有可无的模块,OLED模块、温湿度模块等等 ...

zhouyuming_hbxt的博客 7457

从乐鑫官方教程到真实项目:我的ESP-IDF + VSCode高效开发工作流搭建实录

本文详细介绍了如何将ESP-IDF与VSCode深度整合,打造高效的物联网开发工作流。从环境配置、智能代码导航到编译调试优化,提供了一套完整的解决方案,特别适合Windows平台开发者使用一键安装工具快速搭建开发环境,提升ESP32项目开发效率。

sym19862006的专栏 396

乐鑫ESP-IDF开发环境搭建之2022新版

2022之乐鑫开发环境搭建

qq_42412294的博客 1469

使用 VS Code 快速搭建 ESP-IDF 开发环境 (Windows、Linux、MacOS)

5. 为避免在安装过程中出现无法访问 Github 的情况导致安装失败,需要将服务器设置为 Espressif,并勾选下方的“ 所有 IDF tag 版本”,接着在“选择 ESP-IDF 版本”中选择以 v 开头的则为 TAG 版本。本文详细介绍在 Windows 环境下,如何在 VS Code 中安装 ESP-IDF VS Code 插件,从而简单、便捷的完成 ESP-IDF 环境搭建。4. 接下来,在配置界面选择全局的快速安装模式,此模式无需多余的配置,能够快速简洁的完成安装。

shengyin714959的博客 939

【乐鑫ESP32】ESP-IDF+VSCode环境搭建

目录获取ESP-IDF安装ESP-IDFVSCode插件配置一些小问题 获取ESP-IDF 打开乐鑫官方编程指南 选择你想要的版本下载,这里以v4.4-Offline Installer离线安装为例。 推荐使用离线安装 选择Universal Online Installer 2.13 安装ESP-IDF 1.打开esp-idf-tools-setup-online-2.13,选择中文 2.环境检测 3.选择ESP-IDF版本,自行设置安装位置,记住此位置之后vscode要用上。 4.选择E

weixin_45381001的博客 2万+

esp32技术参考中文word版手册.docx

esp32 精彩的中文技术参考手册,已经翻译成word版本,适合查询和复制,也可以自由编辑,有需要的请下载,对于物联网开发的朋友可以备份存一份。

从零开始:面板数据熵值法的Stata实现与常见陷阱解析

本文详细介绍了面板数据熵值法在Stata中的实现步骤与常见陷阱解析。通过熵值法客观赋权特性,科学构建综合指数,特别适合处理多维面板数据。文章涵盖数据预处理、标准化方法选择、Stata代码实现及结果可视化,并针对常见问题提供实用解决方案,助力研究者避免分析误区。

study的专栏 617

乐鑫ESP32-windows系统-ESP-IDF环境搭建

前言 关于搭建esp-idf这个编译环境,官方手册看似极其简短,实际上却没有那么简单,在我疯狂查百度,并且在linux上重新安装系统来装了两次后,最终,我妥协了,并且找到了最简单的安装方式,工具包方式 基于乐鑫开发指南,一步一步踩坑后得出自己的操作结论,如下; 快速入门 - ESP32 - — ESP-IDF 编程指南 v4.4 文档 (espressif.com) (我使用的是esp32,esp-idf选择了最高版本4.4安装) 文档一开始其实给出了非常明确的要...

weixin_42875661的博客 6950

Win11系统重装全记录:从备份Office激活到搞定RAID阵列,我的微星笔记本复活记

本文详细记录了Win11系统重装的完整过程,从数据备份到RAID阵列配置,特别针对微星笔记本的特殊硬件驱动问题提供了解决方案。文章涵盖了Office激活状态备份、BIOS设置、驱动安装顺序等关键步骤,帮助用户顺利完成系统重装并优化性能。

weixin_31421613的博客 309

gitee 拉取其他分支_如何使用 Gitee 快速搭建 ESP-IDF 开发环境(Windows 版)

前言为更好地服务国内用户,构建中文需求沟通平台,帮助用户快速下载乐鑫开源代码,乐鑫将 GitHub 中的主要仓库(包含 ESP-IDF、ESP-ADF、ESP-MDF 以及阿里、腾讯、京东等国内云平台的连云代码等)镜像到了Gitee(码云,国内基于 Git 的代码托管平台),并进行每日同步,确保与 GitHub 代码一致。值得一提的是,我们还将 ESP-IDF 依赖的子仓库 (submodule)...

weixin_34800976的博客 595

UMI刷盘机器人代码实战:从SLAM到Diffusion Policy的完整部署流程

本文详细解析了UMI(Universal Manipulation Interface)刷盘机器人从数据准备到真实部署的完整实战流程。通过SLAM处理视频数据生成三维轨迹,并训练Diffusion Policy模型,最终将策略部署到UR5机械臂与WSG50夹爪上,实现从模仿学习到物理执行的闭环。

weixin_29042035的博客 461

手把手教你读懂蓝牙BQB射频测试报告:以PRBS9为例的实战分析

本文以蓝牙BQB射频测试中的PRBS9信号为例,提供了一份实战分析指南。文章深入解读了输出功率、调制特性、邻道泄漏等核心测试项,并分享了信号分析仪操作技巧、测试环境搭建要点及设备选型建议,旨在帮助工程师精准解读报告,高效定位问题,确保产品顺利通过认证。

weixin_29289821的博客 261

Linux-Ubuntu下搭建ESP32的开发环境的步骤,使用乐鑫最新稳定版的esp-idf

乐鑫的开发环境是基于python3.8和cmake 3.16下的。我使用的是python3.9.0。之前也安装过esp-idf,这次要安装一个稳定版。

ching的博客 999

Ubuntu 20.04下IgH EtherCAT主站部署实战

本文详细介绍了在Ubuntu 20.04系统上部署IgH EtherCAT主站的完整流程,包括环境准备、源码编译、内核模块配置、网络接口设置及实时性优化等关键步骤。通过实战案例和常见问题排查,帮助开发者快速掌握EtherCAT主站部署技巧,提升工业自动化系统的稳定性和实时性。

weixin_30596343的博客 1071

9句话描述一下乐鑫ESP32模块win7系统下ESP-IDF环境搭建和编译hello_world成功的过程

乐鑫官网的入门指南照顾到了不同操作系统用户的使用需求,作者按照这个说明捣鼓了好多天,终于安装ESP-IDF编程环境成功,然后也编译下载hello_world例程成功了。总结出来9句话,希望能帮助到大家。

ieeee.blog.youkuaiyun.com 3342

告别卡顿闪烁!在Cesium 1.134中集成SOG格式,让400万高斯秒级加载

本文详细介绍了如何在Cesium 1.134中集成SOG格式,实现400万高斯数据的秒级加载,解决传统加载方式导致的卡顿和闪烁问题。通过空间索引重构、属性量化编码和WebGPU原生支持等技术,SOG格式显著提升了三维地理空间可视化的性能。文章还提供了环境准备、模型转换和Cesium集成的实战指南,帮助开发者高效优化项目。

weixin_29313817的博客 499

RK3588 hdmirx 调试(含v4l2工具,edid编辑)

RK3588 Buildroot系统中调试HDMI-RX的过程,包括抓图、修改EDID数据、编辑EDID等操作。首先,通过logcat和寄存器信息查询HDMI-RX的状态,使用v4l2-ctl工具进行测试和修改EDID。

501846585_QQAndroid_java 2685

esp-adf环境搭建-基于vscode插件扩展

esp-adf是一套基于esp-idf框架的音频库我们开发基于乐鑫芯片的音频播放以及语音识别功能需要使用此音频库。我们首先需要安装esp-idf,可以参考我之前教程。

传播知识,分享快乐! 2828

一次搞定 SAP IDoc 失败重处理与安全清理:BD87 实战指南

本文介绍了SAP IDoc错误处理的BD87实战指南。主要内容包括: BD87的核心功能:监控IDoc处理状态并支持人工重处理或标记删除,适用于入站/出站IDoc故障处理。 重处理前的关键步骤: 区分技术错误与业务错误 检查是否允许重复处理 确认日期范围设置正确 标准操作流程:通过BD87选择错误IDoc节点执行重处理,特别适用于状态51的应用错误。 标记删除操作:将无用IDoc标记为可清理状态,后续可通过WE11物理删除或归档处理。 常见问题解决方案:包括权限控制、批量处理优化建议以及自动化定位工具的开发

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 452

嵌入式物联网实战开发笔记-乐鑫ESP32开发环境ESP-IDF搭建【doc.yotill.com】

嵌入式物联网实战开发笔记-乐鑫ESP32开发环境ESP-IDF搭建【doc.yotill.com】

1380

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

深度学习工具包 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 comDirectories 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 workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload 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 weightsrand('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 NNrand('state',0)%train dbndbn.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 nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.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---------------------```matlabfunction test_example_SAEload 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 FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.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---------------------```matlabfunction test_example_CNNload 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% errorrand('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 errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload 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 netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.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 decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = 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 dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = 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 functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = 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 datavx = 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 outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = 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")

上一篇: INA226的初次使用
下一篇: ESP32 Menuconfig 小智机器人图形菜单配置介绍
CDialog
博客等级 码龄23年 245粉丝 87原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

CDialog

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值