首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

Theano&Keras

update ur system

>>>sudo apt update

>>>sudo apt upgrade

install primary dependence

>>>sudo apt install -y python-dev python-pip python-nose gcc g++ git gfortran vim

install eval dependence

>>>sudo apt install -y libopenblas-dev liblapack-dev libatlas-base-dev

get keras

>>>sudo pip install -U --pre pip setuptools wheel

>>>sudo pip install -U --pre numpy scipy matplotlib scikit-learn scikit-image

>>>sudo pip install -U --pre theano

>>>sudo pip install -U --pre keras

test keras

>>>python //进入python环境

>>>import theano

>>>import keras

error:

>>> import theano

>>> import keras

/home/sen/.local/lib/python2.7/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.

from ._conv import register_converters as _register_converters

Using Theano backend.

solution:

open your terminal and input >>>cd ~/.keras to change the backend of keras.

Then input >>ls -al then you can see

drwxrwxr-x 2 sen sen 4096 4月 2 20:06 .

drwxr-xr-x 26 sen sen 4096 4月 2 20:12 ..

-rw-rw-r-- 1 sen sen 120 4月 2 20:06 keras.json

then you can input in terminal >>gedit ~/.keras/keras.json

that's cool!

Good luck!

install tensorflow

you can touch the link "Read original" to get "Tensorflow", that's so detailed.

Warning!If you use VIRTUALENV, pls don't usesudopipto install dependences. And it's effective for pc to install tf by cmake souce code.

  • 发表于:
  • 原文链接http://kuaibao.qq.com/s/20180406G037MM00?refer=cp_1026
  • 腾讯「腾讯云开发者社区」是腾讯内容开放平台帐号(企鹅号)传播渠道之一,根据《腾讯内容开放平台服务协议》转载发布内容。
  • 如有侵权,请联系 cloudcommunity@tencent.com 删除。

扫码

添加站长 进交流群

领取专属 10元无门槛券

私享最新 技术干货

扫码加入开发者社群
领券