Tensor flow toggle between CPU/GPU

前端 未结 6 1185
情歌与酒
情歌与酒 2021-01-30 13:30

Having installed tensorflow GPU (running on a measly NVIDIA GeForce 950), I would like to compare performance with the CPU.

I am running the tensorFlow MNIST tutorial c

6条回答
  •  花落未央
    2021-01-30 13:45

    To turn off GPU, simply add this at the top of your script.

    import os
    os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
    

    (Comment it out when you want to use the GPU again)

提交回复
热议问题