WARNING (theano.tensor.blas): We did not find a dynamic library in the library_dir of the library we use for blas. If you use ATLAS, make sure to compile it with dynamics library.

问题描述

最近在使用theano时老出现这样的提示(如下):

WARNING (theano.tensor.blas): We did not find a dynamic library in the library_dir of the library we use for blas. If you use ATLAS, make sure to compile it with dynamics library. 

去网上查找了一下,原来是因为theano没有找到blas的库导致的.这在使用用CPU进行运算时可能导致运算速度很慢.

解决方法

Ubuntu 18.04

  1. 安装blas及其依赖文件
sudo apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortran
  1. 配置theano环境变量
    .bashrc.zshrc中的最后一行添加如下内容
export THEANO_FLAGS=blas.ldflags="-L/usr/lib/ -lblas"

重启终端或IDE即可

手机上阅读

本文由 kivii创作, 采用 知识共享署名4.0 国际许可协议进行许可
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名
原文地址:《WARNING (theano.tensor.blas): We did not find a dynamic library in the library_dir of the library we use for blas. If you use ATLAS, make sure to compile it with dynamics library.》

 最后一次更新于2019-09-08

0 条评论

添加新评论

Markdown is supported.