plaidML 사용해서 Tensorflow를 AMD GPU로 돌리기
반응형
전에 Direct ML로 시도했던게 잘 안돼서 추가적으로 알게된 plaidml을 적용해 보려고 한다.
Vertex AI(지금은 intell에 인수되었다.)에서 PlaidML이라는 딥러닝 프레임워크를 만들었다.
PlaidML의 가장 큰 특징은 AMD와 intell을 지원한다는 것이다. 심지어 설치도 엔비디아의 CUDA보다 간결하다.
아나콘다에서 ENV 새로 만들고,
tensorflow는 (1.15.5)
keras는 (2.2.2) 를 버젼맞춰서 다운한다.
만약에 keras가 이미 다운되어 있으면 pip uninstall keras하고
pip install kears==2.2.2
PlaidML을 설치하는 방법은,
pip install plaidml-keras plaidbench
plaidml-setup 입력하면 설정창이 나온다.
Enable experimental device support : Y
내가 가지고 있는 GPU 번호를 선택
Enable telemetry reporting : YES
Save Setting : Y
이렇게 설정완료.
실제 파이썬 코드에서 Tensorflow, Keras를 import 하기 전, 아래 코드를 먼저 실행하면 된다.
import plaidml.keras
plaidml.keras.install_backend()
import plaidml.keras
plaidml.keras.install_backend()
나머지 설정은 기존과 동일
반응형
'개발환경' 카테고리의 다른 글
Port 8080 was already in use 에러 해결방법 (0) | 2022.05.15 |
---|---|
spring-boot-devtools 라이브러리 (0) | 2022.05.14 |
Bad file descriptor 오류 해결법 jupyter notebook (0) | 2021.08.02 |
Tensorflow에서 AMD GPU사용하기 (DirectML) (0) | 2021.07.29 |
Tensorflow환경설정(2021.07.29 기준) (0) | 2021.07.29 |
댓글
이 글 공유하기
다른 글
-
spring-boot-devtools 라이브러리
spring-boot-devtools 라이브러리
2022.05.14 -
Bad file descriptor 오류 해결법 jupyter notebook
Bad file descriptor 오류 해결법 jupyter notebook
2021.08.02 -
Tensorflow에서 AMD GPU사용하기 (DirectML)
Tensorflow에서 AMD GPU사용하기 (DirectML)
2021.07.29 -
Tensorflow환경설정(2021.07.29 기준)
Tensorflow환경설정(2021.07.29 기준)
2021.07.29