Tensor flow toggle between CPU/GPU

前端 未结 6 1129
情歌与酒
情歌与酒 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

    Quite a long time elapsed. Recent versions of Tensorflow (at least from 2.0 on) don't require installing both versions with and without gpu support, so you can launch two separate jupyter-notebook instances. Following @Yaroslav's advice:

    $ CUDA_VISIBLE_DEVICES="" jupyter-notebook &
    $ jupyter-notebook &
    

    You will then have two separate jupyter clients open in your browser, typically http://localhost:8888/ and http://localhost:8889/, respectively without and with GPU support, where you can run the same .ipynb notebook and measure the performance difference.

提交回复
热议问题