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.
领取专属 10元无门槛券
私享最新 技术干货