win11+3050ti创建tensorflow2.6 您所在的位置:网站首页 3050ti和3050ti35k的 win11+3050ti创建tensorflow2.6

win11+3050ti创建tensorflow2.6

2024-06-26 22:51| 来源: 网络整理| 查看: 265

1. 版本选择

 tensorflow官网各gpu版本与对应cuda、cudnn版本

从源代码构建  |  TensorFlow

可以看到tf2.6推荐cuda11.2版本

2.cuda安装

CUDA Toolkit Archive | NVIDIA Developer

 

3. cudnn安装

下载对应版本的cudnn

NVIDIA cuDNN | NVIDIA Developer

解压缩,将所有文件复制到cuda的安装路径中,通常为C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5

4.tf 2.6-gpu安装

pip install tensorflow-gpu==2.6.0

5.环境配置

tensorflow官网给出的建议如下:

6.tf-gpu测试

import tensorflow as tf print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))

 得到以下结果,则配置成功

Num GPUs Available: 1

7.pytorch-gpu安装

Start Locally | PyTorch

由于安装了cuda11.2,受版本限制只能安装cuda10.2对应的pytorch gpu版本

conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有