简体   繁体   English

具有 gpu 加速的 Visual Studio 代码(或 jupyter notebook)上的 TensorFlow

[英]Tensorflow on visual studio code ( or jupyter notebook) with gpu acceleration

How can I active gpu acceleration on visual studio code (Windows 11) to compute neural networks with tensorflow?如何在 Visual Studio 代码(Windows 11)上激活 GPU 加速以使用 tensorflow 计算神经网络? gpu = nvidia gtx 1070 ti显卡 = 英伟达 gtx 1070 ti

  1. Download NVIDIA cuDNN下载NVIDIA cuDNN

  2. Download NVIDIA CUDA下载NVIDIA CUDA

  3. Add the extracted CUDA folder to the system environment variable(To the bin directory)将解压出来的CUDA文件夹添加到系统环境变量中(到bin目录下)

  4. install tensorflow package by using pip install tensorflow使用pip install tensorflow安装 tensorflow 包

  5. Test:测试:

    import tensorflow import tensorflow as tf导入张量流 导入张量流作为 tf

    print(tf.test.is_gpu_available())打印(tf.test.is_gpu_available())

If you get True , it means success.如果你得到True ,则意味着成功。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM