] tensorflow cpu버전쓰는법
본문 바로가기

카테고리 없음

tensorflow cpu버전쓰는법

from os import environ

environ['CUDA_VISIBLE_DEVICES'] = '-1'


with tf.device('/cpu:0'):  #cpu를 사용한다.


  • "/cpu:0": The CPU of your machine.
  • "/device:GPU:0": The GPU of your machine, if you have one.
  • "/device:GPU:1": The second GPU of your machine, etc.