Tensorflow tf.config.experimental.set_visible_devices()

사용 버전: Python 3.7.6, Tensorflow 2.1.0


텐서플로우(Tensorflow) tf.config.experimental.set_visible_devices()에 대해서 알아보겠습니다.


괄호 안에는 devices와 device_type 따위가 들어갑니다.

devices에는 실제 GPU 장비의 이름이 들어갑니다.
device_type에는 CPU, GPU를 넣습니다.

tf.config.experimental.set_visible_devices()는 특정 GPU를 선택할 수 있게 해줍니다.
하지만, 여기서 다룰 내용은 CPU만 작동하도록 만드는 방법입니다.


devices에는 빈 리스트를 넣습니다.
device_type에는 GPU를 적습니다.










실행 시, GPU를 사용하지 않습니다.


아래는 GPU 사용 시의 문구입니다.
원래대로 주석 처리해 주면 됩니다.


GPU 사용 시, Create TensorFlow device 문구를 볼 수 있습니다.

끝.



카테고리: Tensorflow_python, Python
 









[계수기] 앱 광고

외국: Hand Counter




계수기 앱.

하나씩 개수를 셀 때 사용해보세요.

센 숫자를 메모와 함께 저장할 수 있습니다.


감사합니다.


[계수기] 앱 광고 끝.


댓글

이 블로그의 인기 게시물

Python urllib.parse.quote()

KiCad 시작하기 4 (기존 회로도 수정 및 추가)

Android Compose Coil library

KiCad 시작하기 1 (회로도 만들기)

Android Notification with Full Screen

iOS Swift callAsFunction

Forensics .pyc 파일 .py로 복구하기

iOS Error Undefined symbol Testing.Trait

Android Custom IME(Input method editor) 만들기

Android Compose automation for getting localized images to use on Play Store app image