import tensorflow as tf
with tf.device('/gpu:0'):
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
with tf.Session() as sess:
print (sess.run(c))
测试tensorflow-gpu
原创东方佑 ©著作权
文章标签 tensorflow 文章分类 代码人生
-
Linux系统Ubuntu部署Python的tensorflow库:CPU+GPU版本
本文介绍在Linux操作系统的发行版本Ubuntu中,配置可以用CPU或GPU运行的Python新版本深度学习库tensorflow的方法~
Linux Ubuntu Python TensorFlow 开发环境 -
解决Python使用GPU
本文简单介绍了使用Python解决使用GPU的方法,并给出了TensorFlow和PyTorch示例;本文还介绍了TensorFlow GPU的安装版本介绍,以及介绍了安装CUDA的详细教程。
CUDA bash Python TensorFlow PyTorch -
基于Python和TensorFlow实现BERT模型应用
在本文中,我们详细介绍了BERT模型的基本原理,并使用Python和TensorFlow实现了一个简单的BERT分类模型。
Python tensorflow 加载 Transformer Bert -
windows安装tensorflow-gpu
conda install tensorflow-gpu 和 pip install tensorflow-gpu 安装的内容是不同的。先安装 cu
tensorflow windows 深度学习 自动安装 python -
Install tensorflow-gpu==2.6.0
install tensorflow-gpu
tensorflow python CUDA -
conda 安装GPU版本TensorFlow-GPU
tensorflow
tensorflow conda python linux系统 -
一文读懂 tensorflow-GPU 安装、测试
tensorflow 安装教程、一文读懂,TensorFlow1.2~2.1各GPU版本与CUDA对应版本
人工智能 深度学习 tensorflow python linux