반응형

Tensorflow 학습 코드를 두개 동시에 실행하는 경우 model.fit에서 다음과 같은 에러가 나서 나중에 실행한 코드는 중단됩니다.

 

tensorflow.python.framework.errors_impl.InternalError:  Attempting to perform BLAS operation using StreamExecutor without BLAS support

 

 

2021. 12. 1  최초작성

 

 

다음 링크에서 가져온 다음 코드를 추가하면 Tensorflow 학습 코드 두개를 동시에 실행해도 에러가 나지 않습니다.

하지만 GPU 메모리 크기에 따라 실행에 문제가 생길 수 있습니다.

 

https://github.com/tensorflow/tensorflow/issues/11812

 

import tensorflow as tf
physical_devices = tf.config.list_physical_devices('GPU')
tf.config.experimental.set_memory_growth(physical_devices[0], True)

 

문제 발생시 지나치지 마시고 댓글 남겨주시면 가능한 빨리 답장드립니다.


제가 쓴 책도 한번 검토해보세요 ^^

+ Recent posts