[Python] Why is tensorflow not recognizing my gpu after installing it with anaconda

Discussão em 'Python' iniciado por Stack, Março 27, 2025.

  1. Stack

    Stack Membro Participativo

    So im trying to use tensorflow with my yolov8 project but for some reason it is not recognizing my gpu. I had originally installed it using pip but i was told i should use conda instead, so i switched to that but still no luck

    import tensorflow as tf
    print(tf.config.list_physical_devices('GPU'))


    prints out

    2025-03-26 18:01:44.726963: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable 'TF_ENABLE_ONEDNN_OPTS=0'. 2025-03-26 18:01:45.737605: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable 'TF_ENABLE_ONEDNN_OPTS=0'. []
    Process finished with exit code 0


    I installed tensorflow using conda create --name tf-gpu tensorflow-gpu and then conda activate tf-gpu

    i am using python 3.12 and have an nvidia rtx 2060 with up to date drivers, on windows 11. Thanks in advance

    Continue reading...

Compartilhe esta Página