0
0

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+Tensorflow Trouble shooting Memo

Last updated at Posted at 2017-12-27

##Tensorflow 使用 GPU 運算 安裝與設定
PC
CPU :i7 6700 3.4GHz
GPU:ASUS ROG Strix GeForce GTX 1080 11Gbps
OS : Win 10

2017/12/3
使用Nvidia CUDA V8.0.61,cuDNN使用第6版,建議這個版本不要用太新,可避免一些不必要的問題。

##Keras+Tensorflow 記憶體自動增長設定
在訓練模型的時候,有時會遇到記憶不足導致發生錯誤,無法順利進行。可以透過以下方法讓限制記憶體的使用。

import tensorflow as tf

# 設定自動增長 GPU 記憶體用量
gpu_options = tf.GPUOptions(allow_growth=True)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))

# 設定 Keras 使用的 Session
tf.keras.backend.set_session(sess)

##參考資料:
Windows10配置TensorFlow-GPU及Keras教程 - Chai_Zheng
G. T. Wang

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?