Tensorflow 학습 코드를 두 개를 동시에 실행하는 경우 model.fit에서 에러Deep Learning & Machine Learning/강좌&예제 코드2021. 12. 1. 21:56
Table of Contents
반응형
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)
반응형
'Deep Learning & Machine Learning > 강좌&예제 코드' 카테고리의 다른 글
tensorflow dataset에서 batch 단위로 window 적용하기 (0) | 2021.12.11 |
---|---|
Tensorflow Dataset 일부만 사용하기 (0) | 2021.12.08 |
Tensorflow - tf.data.Dataset.from_generator 예제 (0) | 2021.11.19 |
텐서플로우 콜백함수( Tensorflow Callbacks ) - ModelCheckpoint, ReduceLROnPlateau, EarlyStopping (0) | 2021.11.17 |
tfds build 시 에러 AssertionError: Unrecognized instruction format ( 또는 Unrecognized split format ) (0) | 2021.11.12 |