4
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Keras on jupyter notebook でGPUを使わない

Posted at

http://qiita.com/kikusumk3/items/907565559739376076b9 に環境変数を使う方法が書いてるけれど、jupyter とかから使う場合に困る(特にjuypterだとノートブック間でGPUの取り合いになりがち)

import keras
import tensorflow as tf
import keras.backend as K
K.tensorflow_backend.set_session(tf.Session(config=tf.ConfigProto(device_count = {'GPU': 0})))

でうまくいくようだ

4
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?