OS:Ubuntu 14.04 LTS
在ELL的tutorial中,有一个步骤是在PC上测试运行一个demo程序来检查ELL能否正常工作,当你选择CNTK model的时候,运行的就是 cntkDemo.py 这个demo程序。
OS:Ubuntu 14.04 LTS
在PC上编译ELL的时候,尽管你可能已经安装了所有ELL文档中要求的软件依赖,可能还是会遇到 undefined reference to `cblas_xxx' 的错误,如下:
[ 0%] Built target documentation
[ 10%] Built target utilities
[ 11%] Built target math
[ 14%] Built target data
[ 23%] Built target emitters
[ 24%] Built target evaluators
[ 28%] Built target functions
[ 37%] Built target model
[ 39%] Built target predictors
[ 48%] Built target nodes
[ 52%] Built target trainers
[ 59%] Built target common
[ 60%] Built target testing
[ 61%] Linking CXX executable common_test
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Copy(int, float const*, int, float*, int)': BlasWrapper.cpp:(.text+0x31): undefined reference tocblas_scopy'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Copy(int, double const*, int, double*, int)': BlasWrapper.cpp:(.text+0x69): undefined reference tocblas_dcopy'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Asum(int, float const*, int)': BlasWrapper.cpp:(.text+0x92): undefined reference tocblas_sasum'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Asum(int, double const*, int)': BlasWrapper.cpp:(.text+0xba): undefined reference tocblas_dasum'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Nrm2(int, float const*, int)': BlasWrapper.cpp:(.text+0xf0): undefined reference tocblas_snrm2'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Nrm2(int, double const*, int)': BlasWrapper.cpp:(.text+0x118): undefined reference tocblas_dnrm2'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Scal(int, float, float*, int)': BlasWrapper.cpp:(.text+0x15b): undefined reference tocblas_sscal'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Scal(int, double, double*, int)': BlasWrapper.cpp:(.text+0x193): undefined reference tocblas_dscal'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Axpy(int, float, float const*, int, float*, int)': BlasWrapper.cpp:(.text+0x1d9): undefined reference tocblas_saxpy'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Axpy(int, double, double const*, int, double*, int)': BlasWrapper.cpp:(.text+0x221): undefined reference tocblas_daxpy'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Dot(int, float const*, int, float const*, int)': BlasWrapper.cpp:(.text+0x259): undefined reference tocblas_sdot'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Dot(int, double const*, int, double const*, int)': BlasWrapper.cpp:(.text+0x290): undefined reference tocblas_ddot'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Gemv(CBLAS_ORDER, CBLAS_TRANSPOSE, int, int, float, float const*, int, float const*, int, float, float*, int)': BlasWrapper.cpp:(.text+0x309): undefined reference tocblas_sgemv'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Gemv(CBLAS_ORDER, CBLAS_TRANSPOSE, int, int, double, double const*, int, double const*, int, double, double*, int)': BlasWrapper.cpp:(.text+0x37c): undefined reference tocblas_dgemv'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Gemm(CBLAS_ORDER, CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, int, int, int, float, float const*, int, float const*, int, float, float*, int)': BlasWrapper.cpp:(.text+0x3f5): undefined reference tocblas_sgemm'
../math/libmath.a(BlasWrapper.cpp.o): In function ell::math::Blas::Gemm(CBLAS_ORDER, CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, int, int, int, double, double const*, int, double const*, int, double, double*, int)': BlasWrapper.cpp:(.text+0x471): undefined reference tocblas_dgemm'
collect2: error: ld returned 1 exit status
make[2]: *** [libraries/common/common_test] Error 1
make[1]: *** [libraries/common/CMakeFiles/common_test.dir/all] Error 2
make: *** [all] Error 2
假设你的JAVA M-R job的输入文件是大量纯文本文件,而且每个文件都比较小(例如几百K),那么job运行起来之后会占用大量mapper数,导致Hadoop集群资源被过度消耗。这种情况可以通过合并输入文件来避免。
网站使用HTTPS的好处就不用多说了,在当今凶险的互联网环境下,使用HTTP越来越不安全,所以我也决定把网站转成HTTPS。使用HTTPS,首先你需要有一张SSL证书。
曾经,收费的SSL证书很贵,一般人玩不起;随着互联网的发展,免费的SSL证书越来越普及,谁都可以很容易获取到,所以HTTPS的个人网站也越来越多。
其中,现在最流行的就是使用可靠的数字证书认证机构Let's Encrypt提供的免费SSL证书。
因为网站要加SSL证书的原因,把nginx折腾了一番,结果SSL相关的配置加到了nginx的配置文件中后,nginx竟然启动不起来了,用 systemctl status nginx 查看到的错误信息大致如下:
Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse ...
于是用如下命令测试问题所在:
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
其中,/usr/local/nginx/sbin/nginx 是我的nginx安装后的可执行程序路径,/usr/local/nginx/conf/nginx.conf 是我的nginx主配置文件路径。
本文软硬件环境:
树莓派:3代 Model B V1.2
OS:Arch Linux ARM,32bit
TensorBoard是Tensorflow的可视化工具。当我们用这篇文章里的方法在树莓派上安装好Tensorflow之后,TensorBoard自然就装好了。于是,下面只剩下怎么启动它的问题。
以下是一个例子。
《Deep Learning》(Ian Goodfellow & Yoshua Bengio & Aaron Courville)第四章「数值计算」中,谈到了上溢出(overflow)和下溢出(underflow)对数值计算的影响,并以softmax函数和log softmax函数为例进行了讲解。这里我再详细地把它总结一下。
如果你在程序中(不是一个Hadoop job程序)有读写HDFS文件的逻辑,那么程序运行的时候可能会报下面的错:
Exception in thread "main" java.io.IOException: No FileSystem for scheme: hdfsat org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:2676)at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2690)at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:94)at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2733)at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2715)at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:382)at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:181)......
本文对应的的Elasticsearch(简写为ES,下同)版本:2.3.5
注:本文写作于多年以前,现在ES已经不提倡使用本文的 TransportClient 来操作ES了,而应使用RestClient。所以本文仅做参考! 2020.08.25
使用Elasticsearch的 JAVA API 来读取其存储的数据,如果遇到这个问题:
org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available
此时,需要确认代码里写的一些配置是正确的。下面,就通过一个实例,来说明如何正确地读取ES里的数据。
从反向传播的4个基本方程这部分内容开始,《Neural Networks and Deep Learning》一书基本上是满屏的数学公式了,然而,得益于作者强大的、深入浅出的表述能力,理解起来并不会让人感觉那么难。
本文将描述反向传播的4个基本方程中的第一个——输出层误差的方程: