Tomcat4.01全攻略

避开LLC环路设计三大坑:从K因子法看谐振频率选择与相位裕度优化 本文深入剖析LLC谐振变换器环路设计中易犯的三大误区,重点阐述如何运用K因子法优化谐振频率选择与相位裕度。文章通过实际案例,解析了工作区域选择、右半平面零点规避及补偿器相位基准等关键问题,为工程师提供了一套系统性的稳定环路设计方法,确保电源在动态负载下可靠工作。 阅读详情
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> 一:简介 tomcat是jakarta项目中的一个重要的子项目,其被JavaWorld杂志的编辑选为2001年度 最具创新的java产品(Most Innovative Java Product),同时它又是sun公司官方推荐的 servlet和jsp容器(具体可以见http://java.sun.com/products/jsp/tomcat/),因此其 越来越多的受到软件公司和开发人员的喜爱。servlet和jsp的最新规范都可以在tomcat 的新版本中得到实现。 二:安装及配置 tomcat最新版本为4.0.1,这个版本用了一个新的servlet容器Catalina,完整的实现了 servlet2.3和jsp1.2规范。注意安装之前你的系统必须安装了jdk1.2以上版本。 (一):安装 1:windows平台 从tomcat网站下载jakarta-tomcat-4.0.1.exe,按照一般的windows程序安装步骤即可安 装好tomcat,安装时它会自动寻找你的jdk和jre的位置。 2:linux平台 下载jakarta-tomcat-4.0.1.tar.gz,将其解压到一个目录。 (二):配置 运行tomcat需要设置JAVA_HOME变量 set JAVA_HOME=c:/jdk (win98,在msdos方式下使用,或者放入autoexec.bat中) export JAVA_HOME=/usr/local/jdk (linux下使用,放到/etc/bashrc或者/etc/profil e中) (三):运行 设置完毕后就可以运行tomcat服务器了,进入tomcat的bin目录,win98下用startup启动 tomcat,linux下用startup.sh,相应的关闭tomcat的命令为shutdown和shutdown.sh。 启动后可以在浏览器中输入http://localhost:8080/测试,由于tomcat本身具有web服务 器的功能,因此我们不必安装apache,当然其也可以与apache集成到一起,下面会介绍 。下面你可以测试其自带的jsp和servlet示例。 三:应用 (一):目录结构 tomcat的目录结构如下: 目录名: 简介 bin : 存放启动和关闭tomcat脚本 conf : 包含不同的配置文件,server.xml(Tomcat的主要配置文件)和web.xml work : 存放jsp编译后产生的class文件 webapp: 存放应用程序示例,以后你要部署的应用程序也要放到此目录 logs : 存放日志文件 lib/japser/common : 这三个目录主要存放tomcat所需的jar文件 (二):server.xml配置简介 下面我们将讲述这个文件中的基本配置信息,更具体的配置信息见tomcat的文档 server: port 指定一个端口,这个端口负责监听关闭tomcat的请求 shutdown 指定向端口发送的命令字符串 service: name 指定service的名字 Connector (表示客户端和service之间的连接): port 指定服务器端要创建的端口号,并在这个断口监听来自客户端的请求 minProcessors 服务器启动时创建的处理请求的线程数 maxProcessors 最大可以创建的处理请求的线程数 enableLookups 如果为true,则可以通过调用request.getRemoteHost()进行DNS查询来 得到远程客户端的实际主机名,若为false则不进行DNS查询,而是返回其ip地址 redirectPort 指定服务器正在处理http请求时收到了一个SSL传输请求后重定向的端口 号 acceptCount 指定当所有可以使用的处理请求的线程数都被使用时,可以放到处理队列 中的请求数,超过这个数的请求将不予处理 connectionTimeout 指定超时的时间数(以毫秒为单位) Engine (表示指定service中的请求处理机,接收和处理来自Connector的请求): defaultHost 指定缺省的处理请求的主机名,它至少与其中的一个host元素的name属性 值是一样的 Context (表示一个web应用程序,通常为WAR文件,关于WAR的具体信息见servlet规范) : docBase 应用程序的路径或者是WAR文件存放的路径 path 表示此web应用程序的url的前缀,这样请求的url为http://localhost:8080/path /**** reloadable 这个属性非常重要,如果为true,则tomcat会自动检测应用程序的/WEB-IN F/lib 和/WEB-INF/classes目录的变化,自动装载新的应用程序,我们可以在不重起to mcat的情况下改变应用程序 host (表示一个虚拟主机): name 指定主机名 appBase 应用程序基本目录,即存放应用程序的目录 unpackWARs 如果为true,则tomcat会自动将WAR文件解压,否则不解压,直接从WAR文件 中运行应用程序 Logger (表示日志,调试和错误信息): className 指定logger使用的类名,此类必须实现org.apache.catalina.Logger 接口 prefix 指定log文件的前缀 suffix 指定log文件的后缀 timestamp 如果为true,则log文件名中要加入时间,如下例:localhost_log.2001-10- 04.txt Realm (表示存放用户名,密码及role的数据库): className 指定Realm使用的类名,此类必须实现org.apache.catalina.Realm接口 Valve (功能与Logger差不多,其prefix和suffix属性解释和Logger 中的一样): className 指定Valve使用的类名,如用org.apache.catalina.valves.AccessLogValve 类可以记录应用程序的访问信息 directory 指定log文件存放的位置 pattern 有两个值,common方式记录远程主机名或ip地址,用户名,日期,第一行请求 的字符串,HTTP响应代码,发送的字节数。combined方式比common方式记录的值更多 注意: 1:经过我测试,我设置Context 的path="",reloadable=true,然后放一个WAR文件到w ebapps目录,结果tomcat不能检测出此文件(重起tomcat可以),而把此文件解压,则to mcat会自动检测出这个新的应用程序。如果不能自动检测WAR文件,我们可以利用下面管 理中讲的方法来部署应用程序。 2:默认的server.xml中,Realm元素只设置了一个className属性,但此文件中也包含几 个通过JDBC连接到数据库进行验证的示例(被注释掉了),通过Realm元素我们可以实现容 器安全管理(Container Managed Security)。 3:还有一些元素我们没有介绍,如Parameter,loader,你可以通过tomcat的文档获取 这些元素的信息。 (三):管理 1:配置 在进行具体的管理之前,我们先给tomcat添加一个用户,使这个用户有权限来进行管理 。 打开conf目录下的tomcat-users.xml文件,在相应的位置添加下面一行: 注意:这一行的最后部分一定是/>,tomcat的文档掉了/符号,如果没有/符号的话,tom cat重起时将无法访问应用程序。通过logs/catalina.out文件你可以看到这个错误的详 细信息。 然后重起tomcat,在浏览器中输入http://localhost:8080/manager/,会弹出对话框, 输入上面的用户名和密码即可。 2:应用程序列表 在浏览器中输入http://localhost:8080/manager/list,浏览器将会显示如下的信息: OK - Listed applications for virtual host localhost /ex:running:1 /examples:running:1 /webdav:running:0 /tomcat-docs:running:0 /manager:running:0 /:running:0 上面的信息分别为应用程序的路径,当前状态(running 或者stopped),与这个程序相连 的session数。 3:重新装载应用程序 在浏览器中输入 http://localhost:8080/manager/reload?path=/examples,浏览器显 示如下: OK - Reloaded application at context path /examples 表示example应用程序装载成功,如果我们将server.xml的Context元素的reloadable属 性设为true(见上面表格),则没必要利用这种方式重新装载应用程序,因为tomcat会自 动装载。 4:显示session信息 在浏览器中输入http://localhost:8080/manager/sessions?path=/examples,浏览器显 示如下: OK - Session information for application at context path /examples Default m aximum session inactive interval 30 minutes 5:启动和关闭应用程序 在浏览器中输入http://localhost:8080/manager/start?path=/examples和http://loc alhost:8080/manager/stop?path=/examples分别启动和关闭examples应用程序。 6:部署及撤销部署 WAR有两种组织方式,一种是按一定的目录结构组织文件,一种是一个后缀为WAR的压缩 包,因此它的部署方式也有两种: (1):在浏览器中输入:http://localhost:8080/manager/install?path=/examples&wa r=file:/c:examples 就会将按目录结构组织的WAR部署 (2):如果输入:http://localhost:8080/manager/install?path=/examples&war=jar:f ile:/c:examples.war!/ 就会将按压缩包组织的WAR部署,注意此url后半部分一定要有!/号。 部署后就可以用 http://localhost:8080/examples访问了。 在浏览器中输入:http://localhost:8080/manager/remove?path=/examples 就会撤销 刚才部署的应用程序。 (四):与apache集成 虽然tomcat也可以作web服务器,但其处理静态html的速度比不上apache,且其作为web服 务器的功能远不如apache,因此我们想把apache和tomcat集成起来。 我们以linux系统为例介绍. 从apache网站下载apache1.3.22源代码版本,然后使用如下命令配置安装apache: mkdir /usr/local/apache tar zxvf apache.1.32.tar.gz cd apache.1.32 ./configure --prefix=/usr/local/apache --enable-module=so make make install 注意configure命令指定目标安装目录,并且加入DSO(Dynamic Shared Object)支持,注 意一定不要忘了这一个选项。 然后下载webapp模块,将解压后mod_webapp.so文件放入apache的libexec目录,编辑ap ache的conf目录下的httpd.conf,在这个文件的最后加入下面三行: LoadModule webapp_module libexec/mod_webapp.so WebAppConnection warpConnection warp localhost:8008 WebAppDeploy examples warpConnection /examples/ 第一行是加入webapp模块,如果编译apache时不增加DSO支持,则无法使用LoadModule指 令,第二行指定tomcat与apache的连接,第三行指定部署那个应用,这两个指令使用格 式如下: WebAppConnection [connection name] [provider] [host:port] WebAppDeploy [application name] [connection name] [url path] 其中connection name指定连接名,provider只能是warp,port端口与你的tomcat的配置 文件server.xml最后几行指定的要保持一致。文件如下: ****** application name与你在tomcat中部署的应用名一致,url path指定访问这个应用的ur l。例如上面的例子可以通过http://localhost/examples/来访问tomcat中的examples应 用。 (五):中文问题 一般jsp的乱码问题可以通过在jsp中加入来解决,至于servlet的乱码在可以使用servlet2.3中提供的HttpServeletR equest.setCharacterEncoding函数。更详细的中文问题请见JSP/Servlet 中的汉字编码 问题。 四:综述 tomcat作为一个servlet(jsp也被编译为servlet执行)容器,其应用前景是非常好的,如 果与jboss结合起来,则可以实现sun的j2ee规范(用jboss作ejb服务器)。jboss的官方网 站也提供集成了tomcat3.2*的jboss以供下载。另外一个开源的应用服务器(enhydra) 也 是基于tomcat的,其提供了更友好的管理界面,部署应用程序也更简单,功能也更强大 。
uniapp - 鸿蒙真机运行报错hvigor ERROR: Failed :entry:default@CompileArkTS...,hvigor ERROR: default@CompileAr uniapp鸿蒙报错> hvigor ERROR: Failed :entry:default@CompileArkTS... hvigor ERROR: default@CompileArkTS watch work[0] failed. 【HarmonyOS】工程编译后报错hvigor ERROR: Failed :entry:default@CompileArkTS,uniAPP鸿蒙开发无法编译运行启动报错,工程编译后报错,运行不起来,删除掉项目entry下的build和.preview缓存文件后重新 阅读详情

相关推荐

保姆级教程:用SNAP处理哨兵一号数据,5步搞定城区范围提取(附江西晋城案例)

本文提供了一份详细的保姆级教程,介绍如何使用SNAP软件处理哨兵一号数据,通过5个关键步骤快速提取城区范围。以江西晋城为例,教程涵盖数据准备、预处理、核心处理流程、自动化搭建及成果分析,帮助用户轻松掌握SNAP操作技巧,适用于城市规划、环境监测等领域。

weixin_32535389的博客 459

Tomcat4.01 配置全攻略

Tomcat4.01 配置全攻略 相关网址:http://www.yufeng.net ----------------------------- Tomcat4.01全攻略  一:简介  tomcat是jakarta项目中的一个重要的子项目,其被JavaWorld杂志的编辑选为2001年度最具创新的java产品(Most Innovative Java Product),同时它又是sun

801

基于IC动态加权的机器学习多因子选股策略:从模型融合到实战回测

在量化投资领域,多因子选股模型通过挖掘市场数据中的有效信号来预测股票收益。其核心原理在于利用统计学与机器学习算法,从海量因子中识别出与未来收益具有稳定相关性的特征。这一技术的核心价值在于将主观投资决策转化为系统化、可重复的客观过程,从而在控制风险的前提下追求超额收益。其典型应用场景包括股票阿尔法策略构建、Smart Beta产品设计以及资产配置中的股票筛选环节。本文聚焦于如何通过信息系数(IC)这一关键指标,动态融合Ridge回归、MLP神经网络和随机森林等多个预测模型,构建一个能够自适应市场风格轮动的选股

weixin_34216614的博客 462

Tomcat4.01配置全攻略

<!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--><script type="text/javascript"

zgqtxwd的专栏 518

西门子PLC1200 1214C DC/DC/DC 驱动步进电机

控制电机旋转的指令在“指令”中的“工艺”下的“Motion Control”(若出现程序块无法调用情况,则看备注3的第4条),本篇只介绍常用指令(若想学习详细与更多指令,请参考指令手册)。

2301_79553921的博客 1万+

revit二次开发环境搭建(2024版)(小白友好)

revit二次开发环境配置,SDK、addin manager和lookup新手友好安装教程

m0_56961251的博客 1434

Tomcat4.01全攻略(转)

一:简介 tomcat是jakarta项目中的一个重要的子项目,其被JavaWorld杂志的编辑选为2001年度最具创新的java产品(Most Innovative Java Product),同时它又是sun公司官方推荐的servlet和jsp容器(具体可以见/rhttp://java.sun.com/products/jsp/tomcat/),因此其越来越多的受到软件公司和开发人员的喜爱。s

风言吾者---崇尚开源 898

【windows】【系统还原】亦是美kms执行一键关闭defender 之后,windows defender 被卸载了,无论如何都打不开

还是执行 都没有明显效果 那么,我最后是怎么解决得呢? 一、打开控制面板(任务栏搜索kzmb)

weixin_41899098的博客 6982

Tomcat4.01全攻略 from chinajavaworld

http://www-900.ibm.com/developerWorks/cn/java/l-tomcat/index.shtml [Series title]: -->Tomcat全攻略

在技术和生活的原野中梦游 759

基于Cesium实现,动态水面+大坝排水动画

一、绘制面状水域,使用水波纹理,进行渲染,水体透明,可以看到底色。三、使用粒子系统,将喷泉改变方向,加上重力设置,实现排水动画。二、绘制线状三维体,用作模拟大坝拦截效果。四、最后,模拟水位上升,进行淹没分析,

一醉千秋的专栏 1431

从 Service Entry Sheet 按 PO 行项目追溯服务行:PACKNO 与 ESLL 层级解包实战

摘要: SAP MM模块中,外部服务采购的数据结构较为复杂,服务明细并非直接存储在采购订单行项目表EKPO中,而是通过PACKNO关联到服务包表ESLL。本文解析了从采购订单行项目EBELN+EBELP获取服务行号SRVPOS的方法,重点分析了服务包的层级结构(根包、子包SUB_PACKNO),并提供了兼容合同项目的ABAP代码实现。通过EKPO-PACKNO定位根包后,需结合ESUC和ESLL表逐层解析子包,最终获取服务明细数据,解决了服务采购场景下的数据关联难题。(149字)

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

Tomcat全攻略

Tomcat4.01全攻略 一:简介 tomcat是jakarta项目中的一个重要的子项目,其被JavaWorld杂志的编辑选为2001年度最具创新的java产品(Most Innovative Java Product),同时它又是sun公司官方推荐的servlet和jsp容器(具体可以见http://java.sun.com/products/jsp/tomcat/),因此其越来越多的受到软件

cocojiji5的专栏 517

优化翼型形状的遗传算法实现

在每一代种群中,通过计算每个个体的适应度值,选择具有较高适应度值的个体,并使用交叉和变异算子对它们进行操作,从而生成新的个体。具体而言,我们将采用一个参数化的翼型模型,其中包括几何设计变量,如角度、弯曲和厚度等,以及性能指标,如升阻比和扭矩等。总之,本文提供了一个基于遗传算法的优化方法,用于寻找最优的翼型形状,并提供MATLAB源代码。需要注意的是,上述代码中的objFunc函数是一个示例性质的目标函数,实际应用中需要根据具体的问题进行修改。1.初始化一个随机的种群,其中每个个体代表一个参数化的翼型模型。

与其临渊羡鱼,不如退而结网 520

Ubuntu部署Tomcat10与Jenkins全攻略

参考链接:https://www.oryoy.com/news/ubuntu-qing-song-bu-shu-tomcat-yi-jian-pei-zhi-war-wen-jian-shi-zhan-zhi-nan.html这里没有分区/u01.先暂时创建/u01目录进行演示。

jiaoxingcheng的博客 2106

深度学习工具包 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")

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

上一篇: 如何学好java
下一篇: Linux环境下安装运行JSP/servlet
java169
博客等级 码龄19年 27粉丝 2568原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址