
Tensorflow
Strange_Ltike
这个作者很懒,什么都没留下…
展开
-
使用pip下载时出现ValueError: check_hostname requires server_hostname
问题使用pip下载时出现ValueError: check_hostname requires server_hostname的报错解决办法出现这个问题是因为你开了代理,只需要把代理关了即可现在再去下载是可以的。原创 2021-12-01 17:59:37 · 935 阅读 · 0 评论 -
Tensorflow调用GPU失败原因查找
问题查找打开镜像,进入python,导入tensorflow,查看提示信息这里出现警告 cudart64_101.dll not found解决办法找到你安装的cuda目录,进入bin文件找到cudart64_*.dll文件,可能你的文件是cudart64_102.dll,只是你只需要把这个文件改为上面提示找不到的文件名即可。完成查看可用设备from tensorflow.python.client import device_libprint(device_lib.list_local原创 2021-12-01 13:57:53 · 2174 阅读 · 0 评论 -
启动Tensorboard时出现dll文件缺少警告
W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not found下载缺失的dll文件,保存至C:\Windows\System文件:百度网盘提取码:xnn2原创 2021-11-20 21:59:37 · 581 阅读 · 0 评论 -
Tensorflow-softmax回归
手动实现softmax回归//首先导入所需的包%matplotlib inlineimport d2lzh as d2lfrom mxnet import autograd, nd//使用Fashion-MNIST数据集,设置批量大小为256batch_size = 256train_iter, test_iter = d2l.load_data_fashion_mnist(batch_size)初始化模型参数num_inputs = 784 //这个参数是由图片的 heigth *原创 2021-11-13 22:50:35 · 956 阅读 · 0 评论 -
Fashion-MNIST图像分类
获取数据集导入需要的包和模块%matplotlib inlineimport d2lzh as d2lfrom mxnet.gluon import data as gdataimport sysimport time#第一次调用时会自动从网上获取数据集。mnist_train = gdata.vision.FashionMNIST(train=True)mnist_test = gdata.vision.FashionMNIST(train=False)#查看获取数据集数量len原创 2021-11-13 22:50:18 · 487 阅读 · 0 评论 -
安装Python库报错Consider using the `--user` option or check the permissions.
Consider using the --user option or check the permissions.使用pip install下载库报Consider using the --user option or check the permissions.解决办法pip install tensorflow替换成pip install --user tensorflow原创 2021-11-13 20:19:12 · 904 阅读 · 0 评论 -
Tensorflow选择CPU或GPU运行
代码import osos.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"os.environ["CUDA_VISIBLE_EDVICES"] = '1' #选择0,1的话是GPU,-1的话CPU原创 2021-11-09 00:21:50 · 2388 阅读 · 0 评论 -
CUDA安装
查看NVIDIA驱动版本首先,在桌面空白处右键->NVIDIA控制面板->左键->“帮助”->“系统信息”->“组件”->“NVCUDA.DLL”查看NVCUDA.DLL的驱动版本,在这显示为10.2.131 driver下载对应的CUDA版本我的NVCUDA.DLL的驱动版本为10.2.131 driver,我选择的是这个10.2的根据自己的驱动版本下载对应的CUDA版本即可下载地址:https://developer.nvidia.com/cuda-to原创 2021-11-09 00:18:56 · 395 阅读 · 0 评论 -
CUDA的作用
显卡中CUDA是什么及作用介绍CUDA(Compute Unified Device Architecture),显卡厂商NVidia推出的运算平台。 CUDA是一种由NVIDIA推出的通用并行计算架构,该架构使GPU能够解决复杂的计算问题。 它包含了CUDA指令集架构(ISA)以及GPU内部的并行计算引擎。 计算行业正在从只使用CPU的“中央处理”向CPU与GPU并用的“协同处理”发展。为打造这一全新的计算典范,NVIDIA(英伟达)发明了CUDA(Compute Unified Device Ar原创 2021-11-09 00:09:29 · 5456 阅读 · 0 评论 -
Tensorflow2中使用TF1中的placeholder出现报错解决方法
报错信息 AttributeError: module ‘tensorflow’ has no attribute ‘placeholder’解决办法将原来的import tensorflow as tf替换成import tensorflow.compat.v1 as tftf.disable_v2_behavior()再次运行代码即可原创 2021-10-25 21:20:30 · 552 阅读 · 0 评论 -
Tensorflow-图像增强api的使用
图片的缩放#resize#tf.image.resize_area#tf.image.resize_bicubic //二次线性函数缩放#tf.image.resize_nearest_neighbor //使用最相似的像素点缩放name = './图片.jgp'img_string = tf.read_file(name)img_decoded = tf.image.decode_image(img_string)img_decoded = tf.reshape(img_decoded原创 2021-10-24 15:05:11 · 1725 阅读 · 0 评论