๋ณด๋ค ๋ ๋น ๋ฅธ ํ์ต์ ์ํด์ tensorflow GPU ๋ฒ์ ์ ์ฌ์ฉํ๋ ค๊ณ tensorflow์ tensorflow-gpu ํจํค์ง๋ฅผ ์ค์นํ๋๋ฐ, ์ฌ์ฉํ๋ ๊ณผ์ ์์ ์๋์ ๊ฐ์ ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ค.
Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
์ค๋ฅ๊ฐ ๋ฌ์ ๋ ๋ฒ์ ์ ์๋์ ๊ฐ๋ค.
tensorflow: 2.5.0 / CUDA: 10.0 / cuDNN: 7.4.5
์์ ์ฌ์ง์ ๋ณด๋ฉด ๋ด๊ฐ ์ง๊ธ GPU๋ฅผ ์ฌ์ฉํ๊ณ ์๋์ง ์ฝ๋ ์์ผ๋ก ํ์ธํด๋ณธ ๊ฑด๋ฐ, tensorflow-gpu๋ฅผ ๊น์์์๋ ๋ถ๊ตฌํ๊ณ ์ค๋ฅ๋ฉ์ธ์ง์ CPU ํ์๋ง ์๊ณ GPU๊ฐ ์กํ์์ง ์์ ๊ฒ์ ํ์ธํ ์ ์๋ค.
GPU๋ฅผ ์ฐ๋์ง ํ์ธํ ์ ์๋ ์ฝ๋๋ ์๋์ ๊ฐ๋ค.
import tensorflow as tf
tf.__version__ # ํ
์ํ๋ก ๋ฒ์ ํ์ธ
from tensorflow.python.client import device_lib
device_lib.list_local_devices() # GPU๋ฅผ ์ฌ์ฉํ๋ ์ง ํ์ธ
์์ธ
tensorflow์ CUDA ๋ฒ์ ์ด ๋ง์ง์์์ ๋ฐ์.
์์ ์ค๋ฅ๋ฉ์ธ์ง๋ฅผ ์์ธํ ๋ณด๋ฉด 'cudart64_110.dll' ๋ฅผ ๋ก๋ํ ์ ์๋ค๊ณ ํ๋๋ฐ ์ด ํ์ผ์ cuda 11์ ์ค์นํ์ ๋ ์กด์ฌํ๋ ํ์ผ์ด๋ค. ๋๋ CUDA 10๋ฒ์ ์ ์ฌ์ฉํ๊ณ ์์ผ๋ ์์๋ฆฌ ์๋ค.
ํด๊ฒฐ
ํ์ฌ CUDA ๋ฒ์ ์ ๋ง์ถฐ tensorflow ๋ฒ์ ์ ๋ณ๊ฒฝํ๋์ง, tensorflow ๋ฒ์ ์ ๋ง๊ฒ CUDA๋ฅผ ๋ณ๊ฒฝํ๋ฉด ๋๋ค.
๋๋ ๊ท์ฐฎ์์ ์ ์๋ฅผ ํํ๋ค.
์๋ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ๋ฉด tensorflow์ ๋ง๋ CUDA ๋ฒ์ ์ ์๋ดํด์ค๋ค.
https://www.tensorflow.org/install/source_windows#gpu
Windows์ ์์ค์์ ๋น๋ | TensorFlow
์์ค์์ TensorFlow pip ํจํค์ง๋ฅผ ๋น๋ํ๊ณ Windows์ ์ค์นํฉ๋๋ค. ์ฐธ๊ณ : ์ ํ ์คํธ๋๊ณ ์ฌ์ ๋น๋๋ Windows ์์คํ ์ฉ TensorFlow ํจํค์ง๊ฐ ์ด๋ฏธ ์ ๊ณต๋๊ณ ์์ต๋๋ค. Windows์ฉ ์ค์ ๋ค์ ๋น๋ ๋๊ตฌ๋ฅผ ์ค์น
www.tensorflow.org
'๐ ์ธ๋ด์ฌ์ด ๋ฐ๋ฅ๋ ๋ง๋ Error ๋ชจ์์ง' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Ubuntu/Docker] apt-get update GPG ์๋ฌ (0) | 2023.02.24 |
---|---|
[Vue.js] npm run ๋ช ๋ น์ด ์ค๋ฅ (0) | 2022.05.11 |
[conda] conda install ์ค๋ฅ (0) | 2021.07.01 |
[MySQL] MySQL ์ค์น 3306 Port ์ค๋ฅ (6) | 2021.04.16 |
[Unity] error CS0234: Post Processing ํจํค์ง ๋ฏธ์ค์น ์ค๋ฅ (2) | 2021.03.16 |