windows64 CPU python2.7 安装theano & keras
来源:互联网 发布:淘宝网店订单处理 编辑:程序博客网 时间:2024/05/29 08:33
根据这里 完成安装了theano包
1. 从gitbub上下载并解压theano 地址
2. 在cmd中, 执行"conda install mingw libpython". 这将安装mingw g++ 和libpython (前提安装了Anaconda)
3. 在cmd中, 进入解压后的theano目录中执行"python setup.py install --record files.txt"
4. 在这里 下载OpenBLAS 我下载了OpenBLAS-v0.2.14-Win64-int64.zip 和 mingw64_dll.zip (电脑64位)
5. 创建C:\openblas文件夹, 将上述两个压缩包解压, 将mingw64_dll中的所有dll文件和OpenBLAS-v0.2.14-Win64-int64/bin中的dll文件放入C:\openblas中
6. 在环境变量path中添加C:\openblas
7. 创建一个新的环境变量 名为THEANO_FLAGS 值为device=cpu,blas.ldflags=-LC:/openblas -lopenblas
此时安装结束
运行:
import numpy as npimport timeimport theanoprint('blas.ldflags=', theano.config.blas.ldflags)A = np.random.rand(1000, 10000).astype(theano.config.floatX)B = np.random.rand(10000, 1000).astype(theano.config.floatX)np_start = time.time()AB = A.dot(B)np_end = time.time()X, Y = theano.tensor.matrices('XY')mf = theano.function([X, Y], X.dot(Y))t_start = time.time()tAB = mf(A, B)t_end = time.time()print("NP time: %f[s], theano time: %f[s] (times should be close when run on CPU!)" % (np_end - np_start, t_end - t_start))print("Result difference: %f" % (np.abs(AB - tAB).max(), ))
输出 NP time: 0.454026[s], theano time: 0.553031[s]
安装theano成功
安装keras: 在cmd中输入pip install keras 即可
0 0
- windows64 CPU python2.7 安装theano & keras
- python windows64位 python2.7安装twisted
- 安装Theano和keras
- Anaconda+Theano+Keras安装
- theano + keras 安装
- theano和keras安装
- Window10安装theano keras cuda
- CentOS6.5+Theano+Keras安装
- 基于theano的keras安装
- Anaconda+Tensorflow+Theano+Keras安装
- CentOS6.5+Theano+Keras安装
- window-anaconda-theano-keras安装
- Anaconda+MINGW+theano+keras安装
- theano与keras安装问题
- ubuntu16.04 64位 cpu安装tensorflow+theano+keras+caffe+xgboost
- Ubuntu 16.04安装tensorflow,theano,keras和caffe,针对CPU only
- windows64上python2.7连接mysql
- win7 theano 和 Keras 安装记录
- 日常生活
- TrueCrypt 变废为宝-银行U盾
- maven
- Bitset类总结
- Arrays类的copyOf与System类的arrayscopy()的区别
- windows64 CPU python2.7 安装theano & keras
- 梳理caffe代码relu_layer(二十一)
- EditText总结
- leetcode05题
- java 动态性之反射机制 详解 案例
- c#接口和抽象类比较
- android倒计时功能的实现
- 如何用5天设计出一款认真的产品?Google Design Sprint实战!
- SQL Server删除重复行的6个方法