GPU parallel computing for machine learning in Python: how to build a parallel computer by Yoshiyasu Takefuji

GPU parallel computing for machine learning in Python: how to build a parallel computer by Yoshiyasu Takefuji

Author:Yoshiyasu Takefuji
Language: eng
Format: azw3, epub, pdf
Published: 2017-06-16T07:00:00+00:00


keras (machine learning framework)

In order to activate p27 environment (python2.7 environment), run the following source command:

$ source p27/bin/activate

Once p27 is activated, prompt will be (p27).

In order to install keras and tensorflow-gpu, run the following command:

(p27) $ pip install keras tensorflow-gpu

"python -V" command shows python version.

(p27) $ python -V

python 2.7.12

"pip -V" command shows pip version.

(p27) $ pip -V

pip 9.0.1 from /home/takefuji/p27/lib/python2.7/site-packages (python 2.7)

To run mnist_cnn.py, run the following command:

(p27) $ python mnist_cnn.py

Using TensorFlow backend.

x_train shape: (60000, 28, 28, 1)

60000 train samples

10000 test samples

Train on 60000 samples, validate on 10000 samples

Epoch 1/12

...

Test loss: 0.0271579699688

Test accuracy: 0.9911



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.