잠토의 잠망경

[Python] Keras InternalError: GPU sync failed 본문

공부/Python

[Python] Keras InternalError: GPU sync failed

잠수함토끼 2020. 7. 4. 07:03

Solution

문제

InternalError: GPU sync failed

해결

코드상에 아래 부분을 넣어준다.

from keras.backend import tensorflow_backend as K
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
K.set_session(tf.Session(config=config))
Comments