win10安装keras theano

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_23301703/article/details/82466453

1. 安装Anaconda,anaconda是环境管理软件

建议安装Anaconda3 4.2.0版本,目前新出的python3.6存在部分不兼容问题

https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/

安装时记得勾选两个√

2.安装mingw编译器以及相应包

cmd中输入

conda install mingw libpython

安装完成后再环境变量中添加

F:\Anaconda\MinGW\bin

F:\Anaconda\MinGW\x86_64-w64-mingw32\lib

注意:Anaconda需要在你的电脑的安装目录

3.theano配置文件

找到目录C:\Users\Admin(你的用户名),在此目录下新建文本文件.theanorc.txt注意文件开始有个.文件中输入

[global]

openmp=False

[blas]

ldflags=

[gcc]

cxxflags=-IF:\Anaconda\MinGW 

注意 -I 是指令, -I后是你的Anaconda目录

4.theano 安装

cmd中输入 pip install keras 和 pip install theano

5.测试

下载手写数据集进行运行CMD中输入

conda install git
git clone https://github.com/fchollet/keras.git
cd keras/examples/
python mnist_mlp.py

猜你喜欢

转载自blog.csdn.net/qq_23301703/article/details/82466453