tensorflow-gpu 安装

目录

2024.01.05 tensorflow-gpu

安装后,constant 函数,is_tensor函数,Tensor类型都没有了。

解决方法:

1.15.0版本


2024.01.05 tensorflow-gpu

pip install tensorflow-gpu==2.10 -i https://pypi.tuna.tsinghua.edu.cn/simple

安装后,constant 函数,is_tensor函数,Tensor类型都没有了。

import tensorflow as tf

# 创建一个 TensorFlow Tensor 对象
tensor_variable = tf.constant([1, 2, 3])

# 判断变量是否是 Tensor 对象
is_tensor = tf.is_tensor(tensor_variable)

print(is_tensor) # 输出 True 或 False

解决方法:

pip install tensorflow-gpu==2.8.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

1.15.0版本

解决办法:无需删除cuda10.1,也无需再下载cuda10.0包,直接

conda install cudatoolkit=10.0。

https://github.com/tensorflow/tensorflow/issues/30638

cudnn安装:

conda install cudnn=7.0.5 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/

ok的,不写版本会自动选版本:

conda install tensorflow-gpu==1.15.0

根据引用\[1\]和引用\[2\]的内容,安装tensorflow-gpu有两种方法。第一种方法是使用conda安装,命令为"conda install tensorflow-gpu==2.6.0"。第二种方法是使用pip安装,命令为"pip install tensorflow-gpu==1.9 -i https://pypi.tuna.tsinghua.edu.cn/simple"。在安装之前,需要确保已经卸载了之前安装tensorflow及其相关依赖包,可以使用pip uninstall命令进行卸载。例如,卸载tensorflow的命令为"pip uninstall tensorflow"。卸载完毕后,再进行tensorflow-gpu安装。 #### 引用[.reference_title] - *1* [Tensorflow-gpu安装教程(详细)!!!](https://blog.csdn.net/m0_68233404/article/details/128525860)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [tensorflow-GPU版本安装教程(过程清晰一目了然,看完变大佬)](https://blog.csdn.net/AI_JOKER/article/details/102757985)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [tensorflow-gpu版本安装教程(过程详细)](https://blog.csdn.net/qq_43215538/article/details/123852028)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AI算法网奇

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值