ubuntu下nutch-1.0的安装和配置错误排除

com.atguigu.springcloud 立即下载

一、安装JDK(笔者推荐使用原生的方式安装SUN-JDK6(这个方面的安装指导和错误排除可以看 http://blog.163.com/sukerl@126/blog/static/112027649200941110432596))
一、保证TOMCAT的正常安装,这个方面的安装指导和错误排除可以看
http://blog.163.com/sukerl@126/blog/static/11202764920094610148888/
二,下载nutch-1.0,解压后,并将它拷贝到/opt/目录下。
cd  /opt/nutch-1.0
root@fjadmin-webcrawler:/opt/nutch-1.0# sh bin/nutch crawl
一般来说没有设置JAVA_HOME等环境,会报以下错误:
[: 72: ==: unexpected operator
Error: JAVA_HOME is not set.
这里应编辑gedit /etc/environment来解决这个错误
进入root帐号:
sudo su
然后编辑environment
gedit /etc/environment
编辑后内容如下:
JAVA_HOME="/usr/lib/jvm/jdk/jdk1.6.0_13"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/jdk/jdk1.6.0_13/bin"
LANGUAGE="zh_CN:zh:en_US:en"
LANG="zh_CN.UTF-8"
CLASSPATH=/usr/lib/jvm/jdk/jdk1.6.0_13/lib:/usr/lib/jvm/jdk/jdk1.6.0_13/jre/lib



其中/usr/lib/jvm/jdk/jdk1.6.0_13是SUN-JDK的安装位置,笔者将它装到了/usr/lib/jvm/jdk/jdk1.6.0_13目录下

然后重启UBUNTU或者注销
接着进入root帐号
sudo su
再次尝试
cd  /opt/nutch-1.0
root@fjadmin-webcrawler:/opt/nutch-1.0# sh bin/nutch crawl
一般可能再次报错:
root@fjadmin-webcrawler:/opt/nutch-1.0# sh bin/nutch crawl
[: 72: ==: unexpected operator
[: 132: ==: unexpected operator
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/nutch/crawl/Crawl
Caused by: java.lang.ClassNotFoundException: org.apache.nutch.crawl.Crawl
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: org.apache.nutch.crawl.Crawl.  Program will exit.
表面上看上去这个错误是CLASSPATH设置错误,其实并不完全如此,
使用
gedit bin/nutch
打开这个nutch看个明白,到底怎么回事?
可以看到(红色标的是重点)
# some Java parameters
if [ "$NUTCH_JAVA_HOME" != "" ]; then
  #echo "run java in $NUTCH_JAVA_HOME"
  JAVA_HOME=$NUTCH_JAVA_HOME
fi

if [ "$JAVA_HOME" = "" ]; then
  echo "Error: JAVA_HOME is not set."
  exit 1
fi
上面的红色可以看出当前没有设置JAVA_HOME时,会提示Error: JAVA_HOME is not set.这个错误我们已经在刚才遇到了

JAVA=$JAVA_HOME/bin/java
JAVA_HEAP_MAX=-Xmx1000m

# check envvars which might override default args
if [ "$NUTCH_HEAPSIZE" != "" ]; then
  #echo "run with heapsize $NUTCH_HEAPSIZE"
  JAVA_HEAP_MAX="-Xmx""$NUTCH_HEAPSIZE""m"
  #echo $JAVA_HEAP_MAX
fi

# CLASSPATH initially contains $NUTCH_CONF_DIR, or defaults to $NUTCH_HOME/conf
CLASSPATH=${NUTCH_CONF_DIR:=$NUTCH_HOME/conf}
CLASSPATH=${CLASSPATH}:$JAVA_HOME/lib/tools.jar

# so that filenames w/ spaces are handled correctly in loops below
IFS=

# for developers, add plugins, job & test code to CLASSPATH
if [ -d "$NUTCH_HOME/build/plugins" ]; then
  CLASSPATH=${CLASSPATH}:$NUTCH_HOME/build
fi
if [ -d "$NUTCH_HOME/build/test/classes" ]; then
  CLASSPATH=${CLASSPATH}:$NUTCH_HOME/build/test/classes
fi

if [ $IS_CORE == 0 ]
then
  for f in $NUTCH_HOME/build/nutch-*.job; do
    CLASSPATH=${CLASSPATH}:$f;
  done

  # for releases, add Nutch job to CLASSPATH
  for f in $NUTCH_HOME/nutch-*.job; do
    CLASSPATH=${CLASSPATH}:$f;
  done
else
  CLASSPATH=${CLASSPATH}:$NUTCH_HOME/build/classes
fi

# add plugins to classpath
if [ -d "$NUTCH_HOME/plugins" ]; then
  CLASSPATH=${NUTCH_HOME}:${CLASSPATH}
fi

# add libs to CLASSPATH
for f in $NUTCH_HOME/lib/*.jar; do
  CLASSPATH=${CLASSPATH}:$f;
done
这是这个错误产生的关键,可以打开lib目录看一下,有如下文件($NUTCH_HOME是指当前nutch的运行目录,当前是在/opt/nutch-1.0处 )
apache-solr-common-1.3.0.jar   commons-httpclient-3.0.1.jar   icu4j-4_0_1.LICENSE.txt   jetty-ext                native                   xerces-2_6_2.jar
apache-solr-solrj-1.3.0.jar    commons-lang-2.1.jar           jakarta-oro-2.0.8.jar     junit-3.8.1.jar          servlet-api.jar
commons-beanutils-1.8.0.jar    commons-logging-1.0.4.jar      jets3t-0.6.1.jar          junit-3.8.1.LICENSE.txt  taglibs-i18n.jar
commons-cli-2.0-SNAPSHOT.jar   commons-logging-api-1.0.4.jar  jets3t-0.6.1.LICENSE.txt  log4j-1.2.15.jar         taglibs-i18n.tld
commons-codec-1.3.jar          hadoop-0.19.1-core.jar         jetty-5.1.4.jar           lucene-core-2.4.0.jar    tika-0.1-incubating.jar
commons-collections-3.2.1.jar  icu4j-4_0_1.jar                jetty-5.1.4.LICENSE.txt   lucene-misc-2.4.0.jar    xerces-2_6_2-apis.jar
但是就是无法找到org.apache.nutch.crawl.Crawl所在的JAR文件, 这些CLASS文件都被打包成JAR文件了,那么这个JAR文件到哪去了呢?
我们进入/opt/nutch-1.0
ls一下,原来在根目录下,靠!
        CHANGES.txt  default.properties  KEYS  LICENSE.txt  NOTICE.txt     nutch-1.0.war  nutchstart.sh~  README.txt  taxurls.txt  webapps

build.xml  conf         docs                lib   logs       nutch-1.0.jar  nutch-1.0.job  nutchstart.sh  plugins         src         taxweb
注意这个 nutch-1.0.jar就是整个org.apache.nutch的核心CLASS文件的打包(包括Crawl),原因已经找到,在CLASSPATH中根本就没有这个 nutch-1.0.jar文件,因为这个文件根本就不在 $NUTCH_HOME/lib/*.jar范围中,所以会出现找不到org.apache.nutch.crawl.Crawl类的情况


for f in $NUTCH_HOME/lib/jetty-ext/*.jar; do
  CLASSPATH=${CLASSPATH}:$f;
done

# cygwin path translation
if $cygwin; then
  CLASSPATH=`cygpath -p -w "$CLASSPATH"`
fi

问题已经找到
现在我们把 nutch-1.0.jar拷贝到/opt/nutch-1.0/lib下
OK
成功解决了这个难题(这个难题我GOOGLE了很久也没有结果,只好自己搞定)
root@fjadmin-webcrawler:/opt/nutch-1.0# sh bin/nutch crawl
[: 72: ==: unexpected operator
[: 132: ==: unexpected operator
Usage: Crawl <urlDir> [-dir d] [-threads n] [-depth i] [-topN N]

jflow-core-1.1.0-SNAPSHOT.jar Failure to find jflow-core:jflow-core:jar:1.1.0-SNAPSHOT 驰骋的MAVEN不靠谱,只能自己编译然后传上来了 立即下载

相关推荐

Robust MPC 4 (鲁棒&随机 MPC)

Robust MPC

weixin_44299806的博客 2735

Cannot resolve com.atguigu.springcloud:cloud-api-commons:1.0-SNAPSHOT

Injection of resource dependencies failed; Cannot resolve com.atguigu.springcloud:cloud-api-commons:1.0-SNAPSHOT

qq_36833593的博客 1万+

ZYNQ平台AXI DMA传输避坑指南:如何快速定位‘errors:200‘等中断故障

本文详细解析了ZYNQ平台AXI DMA传输中常见的'errors:200'等中断故障,提供了从寄存器解析到压力测试的完整解决方案。通过深入分析XILINX_DMA中断机制、错误分类及五步排查法,帮助开发者快速定位并解决DMA传输问题,提升系统稳定性与性能。

weixin_29159613的博客 440

Maven构建项目报:Cannot resolve com.xxx.xxx:xxx:1.0.0-SNAPSHOT

1、使用maven构建项目,无论是重新加载maven还是 install、package、deploy 控制台都会报:Cannot resolve com.jkmic.parent:framework-core:1.0.2-SNAPSHOT。2、当前项目如果依赖其他项目服务依赖包,经常会出现其他项目已经打包并且 deploy 到maven仓库中了,但是无论当前项目怎么刷新maven依然无法拉取到最新的依赖快照包。

hkl_Forever的博客 9783

西电微机系统课程设计——步进电机开环控制系统设计

西电微机系统课程设计——步进电机开环控制系统设计 一、课程设计目的 1.掌握微机系统总线与各芯片管脚连接方法,提高接口扩展硬件电路的连接能力。 2.加深对 A/D 和并行接口芯片的工作方式和编程方法的理解。 3.搞懂步进电机的工作原理及控制方式,掌握开环控制系统的设计思路和实现方法。 二、课程设计的内容 手动调节电位器旋钮(0V~5V),通过 ADC0809 模拟输入水库水位 0 米~50 米,CPU收到水位信号后,根据水位高度控制步进电机(水闸)进行调节。 三、系统功能与设计要求 基本功能要求 手

OutlierLi's Blog 7525

手把手教你搭建Howland电流源:从原理图到实测避坑指南(附Python数据分析)

本文详细介绍了Howland电流源的设计与实现,从原理图到实测避坑指南,涵盖电阻匹配、运放选择和PCB布局等关键环节。通过Python数据分析,展示了如何优化电路性能并解决常见问题,适合电子工程师和爱好者参考。

weixin_29291069的博客 634

Cannot resolve com.XXX:XXX:0.0.1-SNAPSHOT

问题出处: 1、首先检查maven中conf中的settings.xml是否配置了 2、检查mavenjar宝存放位置及maven版本file-sttings-maven

村东头老杨的博客 3万+

一次把 PRIV mode 讲透:从 ABAP 内存分配链路到定位与治理

ABAP系统进入PRIV模式的本质是Extended Memory耗尽时转向Heap内存的应急机制。该现象会导致工作进程被独占,系统吞吐量下降。触发条件包括系统EM资源池耗尽或单个用户超过配额阈值。关键参数em/address_space_MB和ztta/roll_extension需协同调整。典型症状包括SM50显示PRIV状态、响应延迟和内存dump。治理需双管齐下:系统侧合理配置内存参数,代码侧优化内存使用模式,如分页处理、减少大内表操作和下推聚合逻辑。PRIV模式应作为异常信号而非常态目标,健康系统

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

maven项目install的一个小坑

使用maven项目抽共同需要install达成jar包时候出现的一个小问题,就是会在本地仓库内生产instal的jar包,但是本地仓库里面的文件名是有规范的,也就是说如果你父子项目pom的groupId的第一层如果是是敏感词的话,会找不到路径,敏感字比如(con),错误(Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project cloud-api-

qq_42340806的博客 1050

手把手教你学 NPU 驱动开发--第一部分:基础准备 开发环境搭建:Linux 内核编译与 NPU 仿真平台配置

摘要:本文详细介绍了搭建Linux内核编译与NPU仿真平台的完整流程。主要内容包括:1) 准备ARM64交叉编译工具链;2) 编译支持KGDB调试的Linux内核;3) 构建最小根文件系统;4) 使用QEMU模拟自定义NPU设备;5) 配置KGDB调试环境。文章重点讲解了如何通过修改设备树添加虚拟NPU设备,并提供了开源NPUIP Gemmini作为实验对象。最后展示了简单的"Hello NPU"驱动验证方法,为后续NPU驱动开发奠定了基础。文中还附有常用命令速查表,方便开发者快速搭建调

MHD0815的博客 384

ROS机器人未知环境自主探索功能包explore_lite最全源码详细解析(一)

本系列文章主要针对ROS机器人常使用的未知环境自主探索功能包explore_lite展开全源码的详细解析,并进行概括总结。 本系列文章共包含六篇文章,前五篇文章主要介绍explore_lite功能包中 explore.cpp、costmap_tools.h、frontier_search.cpp、costmap_client.cpp等源码实现文件中全部函数的详细介绍,第六篇文章进行概括总结,包含自主探索功能包explore_lite的简介,实现未知环境自主探索功能的原理及流程总结,效果演示,使用功能包

慕羽★的博客 3936

Cannot resolve .....报错问题解决

当导入maven管理的项目后,maven进行自动的下载和解析依赖,有时候因为网络问题,等待太久没下载好,我们就关闭了IDEA,再次打开IDEA时就会报错某某依赖无法解析:Cannot resolve …,是因为我们下载到一半就关闭了IDEA,导致下载的内容不全,所以无法解析. 此时的解决方法是复制报错依赖的版本号前的那段依赖名称:如下图 在utools的everything插件里查找该依赖:如下图 切换到该文件夹,我们就能看待报错的依赖:如下图 我们将该依赖直接删除,或者点击该依赖文件进去找到尾缀为.l

张老板的博客 5万+

基于Harness Engineering构建AI Agent的全自动化CI_CD流水线

AI Agent的CI/CD是指对Agent的全生命周期资产(代码、Prompt、RAG知识库、模型权重、工具配置)进行持续集成、持续测试、持续发布和持续观测的自动化流程,核心目标是在保障发布质量的前提下,最大化提升Agent的迭代效率。

AI云原生与云计算技术学院 625

手动搭建Nutch环境:从零构建可控网络爬虫的完整指南

在数据采集与搜索引擎技术领域,环境搭建是深入理解系统原理和实现定制化控制的关键步骤。从PyTorch、YOLOv5到ESP32等开发环境,手动配置过程揭示了底层组件间的依赖关系和工作机制。网络爬虫作为数据获取的核心技术,其价值在于能够自动化、规模化地采集互联网信息,广泛应用于搜索引擎构建、市场分析、舆情监控等场景。通过手动搭建Apache Nutch这一经典开源爬虫框架,开发者可以深入掌握爬虫调度、页面解析、链接发现等核心原理,实现对数据采集流程的完全可控。本文聚焦于Nutch环境搭建,结合单机部署实践,详

weixin_30315723的博客 342

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

nutch-乱码解决(转)

ubuntu下nutch-1.0的安装和配置错误排除(原创) 国内部份建立在云计算之上的网站 nutch-乱码解决搜索引擎与人工智 2009-05-13 12:02:49 阅读75 评论0 字号:大中小 订阅 在Nutch的搜索框中输入中文,点击“搜索”按钮之后,可以看到搜索框中的关键字是乱码,搜索结果也为空。网上有很多文章都谈到了这个现象,这不是Nutch的问题,而是T...

Feythin Lau 223

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

IDEA中maven仓库依赖报错:Cannot resolve com.example:product-server:0.0.1-SNAPSHOT

IDEA中maven仓库依赖报错:Cannot resolve com.example:product-server:0.0.1-SNAPSHOT 解决方法: File -> Settings -> maven -> Importing Apply -> OK 之后,问题解决

xi 1万+

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

IntelliJ IDEA 2022.2.2 :编译失败的问题:Failed to execute goal on project

学习尚硅谷的springcloud教程的重构的时,把公用方法抽取成为公用方法模块后,其他子模块无法编译失败,然后遇到如下的错误。在父工程的maven生命周期中执行:clean-->validate-->compile-->install 以后文件解决。

weixin_40731298的博客 625

Invalid packaging for parent POM com.cloud:springcloud_demo:1.0-SNAPSHOT, must be “pom“ but is “jar“

子项目用maven打包的时候报错, 解决方法:父项目springcloud_demo的pom.xml指定打包方式:<packaging>pom</packaging> <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-insta

chenlu4ever的专栏 4220

Ubuntu环境下搭建nutch环境

ubuntu环境下配置nutch,以及配置nutch过程中可能出现的问题及解决方案

oba没有马 3775

解决 cannot resolve 依赖包的问题

在maven import的时候 报这样的错误 可能是下载的依赖包存在不完整等奇奇怪怪的问题,无法解析,而由于本地有缓存,maven不会从远程中心库重新下载。 主要的解决方法就是重新下载依赖,可尝试如下方法中任一解决 可清缓存重新加载项目(idea选择 invalidate caches/restart),会重新下载全部依赖 删除本地maven repository中对应依赖包,在项目中reimport重新下载依赖。 比如 org.xxx.zzz 导入出了问题,就进入 ~/.m2/repos..

liutianxiazhendehao的博客 1万+

spring cloud 版本错Cannot resolve org.springframework.cloud:spring-cloud-starter-openfeign:unknown

如下图,有些博客说下面位置指定具体版本,就能解决,但是小宁亲自指定版本号2.3.6.RELEASE仍然不行。以上方法可能不一定都适用,不行就在百度其他博主的,小宁菜鸟一枚,有问题欢迎指出。总结:总的来说还是版本问题,不一定要追求最新版,不然要采坑的。说明:创建spring cloud项目后依赖错误。标签下的版本号修改成红框上的版本就行了。小宁最终找到原因了,

weixin_58094032的博客 2672

解决Cannot resolve com.alibaba.cloud:aliyun-oss-spring-boot-starter:unknown 文件上传报错aliCloudEdasSdk解决

1.解决unknown: <!--引入spring cloud alibaba--> <dependencyManagement> <dependencies> <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-al

cevent的博客 3万+

SpringCloud - 服务提供者和服务消费者

SpringCloud - 服务提供者和服务消费者 0. 概述 服务提供者: 服务的被调用方,为其他服务提供服务的服务 服务消费者: 服务的调用方,即依赖其他服务的服务 1. 建立父工程 建立maven工程,然后将src文件夹删除: 更改pom文件: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://ww

你今天真好看呀 941

1.SpringCloud-工程重构

引用笔记Spring Cloud 学习笔记(1 / 3)_KISS-优快云博客Spring Cloud 学习笔记(2 / 3)Spring Cloud 学习笔记(3 / 3)---01_前言闲聊和课程说明02_零基础微服务架构理论入门03_第二季Boot和Cloud版本选型04_Cloud组件停更说明05_父工程Project空间新建06_父工程pom文件07_复习DependencyManagement和Dependencies08_支付模块构建(上)09_支付模块构建(中)10_支付模块构建(下)11

weixin_45974277的博客 465
上一篇: nutch-乱码解决
下一篇: ubuntu下nutch-1.0的安装和配置错误排除
deepfuture
博客等级 码龄17年 210粉丝 1287原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值