"Failed to get convolution algorithm. This is probably because cuDNN failed to initialize,
so try looking to see if a warning log message was printed above."
GPU를 사용하여 합성곱 신경망 모델로 학습할 때, 자주 발생하는 오류입니다.
해당 오류는 VRAM과 관련이 있습니다.
아래 코드를 작성해주면 해결됩니다.
# set gpu
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)
# logical_gpus = tf.config.experimental.list_logical_devices('GPU')
# print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
except RuntimeError as e:
print(e)
'AI > TensorFlow & PyTorch' 카테고리의 다른 글
[TensorFlow] RNN, LSTM, GRU를 이용한 영화 리뷰 감성 분석 (0) | 2023.06.08 |
---|---|
[TensorFlow] 텐서플로우(TensorFlow 2.x) CNN을 이용한 Fashion MNIST (0) | 2021.04.07 |
[TensorFlow] 텐서플로우(TensorFlow 2.x) Fashion MNIST (0) | 2021.03.05 |
[TensorFlow] 텐서플로우(TensorFlow 2.x) 와인 데이터 다항 분류 (0) | 2021.03.05 |
[TensorFlow] 텐서플로우(TensorFlow 2.x) 와인 데이터 이항 분류 (0) | 2021.03.05 |