![](https://img-blog.csdnimg.cn/20190918140012416.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Bug
文章平均质量分 50
记下学习过程中 那些代码田 里的坑坑洼洼。
Wupke
以慕灵阁之名践行:心怀初学者的姿态,Stay hungry, Stay foolish!
展开
-
【ubuntu18.04】 su:认证失败
【ubuntu18.04】 su:认证失败问题描述:解决方法:问题描述:【ubuntu18.04】 su:认证失败1 yourname@ubuntu:~$ su 2 密码:<- 输入root 密码3 su:认证失败 这是ubuntu18.04安装好以后,root用户默认是被锁定了的,不能登录,也不能从 “su” 到 root 切换。要使用passwd命令重新设置下root密码。解决方法:允许 su 到 root只需要重新设置下密码即可:1 me@ubuntu原创 2022-01-09 21:14:23 · 1020 阅读 · 0 评论 -
【yolov3 训练报错:TypeError: ‘NoneType’ object is not subscriptable / Caught FileNotFoundError in Data】
【yolov3 训练报错:TypeError: ‘NoneType’ object is not subscriptable】情况描述:解决:情况描述:在训练代码中修改数据集读取路径,运行 train.py 文件 产生报错:解决:经过网上搜索借鉴以及查看,发现是数据集(训练集/验证集)文件夹中的图片命名中存在空格,导致数据列表读取为空,本质上是数据集的路径问题。训练时,要仔细检查数据的路径读取,可以在代码中 print 出来相关参数,以验证查看。相关链接推送:【基于YOLO-原创 2022-01-07 19:24:38 · 4015 阅读 · 2 评论 -
【配置VScode支持编译c++11】
情况:在基于范围内对数组进行遍历时,发现不能运行: for(int&e:array) (C++11的新特性,对一个范围内的元素进行有序访问,更方便的用法。)// 了解基于范围的for循环#include <iostream>using namespace std;int main(){ int array[3]={1,2,3}; for(int&e:array){ e += 2; cout&...原创 2021-11-17 14:16:48 · 1331 阅读 · 0 评论 -
【‘string‘ does not name a type / c++】
在 c++ 头文件中书写类声明的过程中:遇到#ifndef CLIENT_H_ // 避免重复声明#define CLIENT_H_ // 避免重复声明class Dog{private: string name; string weight; string color;public: void Info(string name,string weight,string color); void show_info(); voi原创 2021-11-06 17:25:02 · 2014 阅读 · 2 评论 -
【已解决】UnboundLocalError: local variable ‘xxx‘ referenced before assignment情况的解决方法
UnboundLocalError: local variable 'xxx' referenced before assignment情况的解决方法问题背景解决方法补充:Reference问题背景运行下列代码时: if self.draw_coord: p1 = (int(self.coord[0]), int(self.coord[1])) p2 = (int(self.coord[0] + self.coor原创 2021-09-03 15:23:21 · 15123 阅读 · 4 评论 -
【解决】Failed to get convolution algorithm. This is probably because cuDNN failed to initialize.
【解决】Failed to get convolution algorithm. This is probably because cuDNN failed to initialize.报错描述:解决方法:运行效果:Reference报错描述:配置yolov4-deepsort官方代码环境,依据官方测试运行命令:python save_model.py --model yolov4 出现报错:dependencies:python==3.7cudnn==7.5.1cudato原创 2021-08-29 15:41:23 · 1462 阅读 · 0 评论 -
【解决】ValueError: Memory growth cannot differ between GPU devices
【解决】ValueError: Memory growth cannot differ between GPU devices报错描述:解决方法:Reference报错描述:配置yolov4-deepsort官方代码环境,依据官方测试运行命令:python object_tracker.py --video ./data/video/test.mp4 --output ./outputs/demo.avi --model yolov4出现报错:主要依赖:dependencies:原创 2021-08-29 15:40:48 · 2889 阅读 · 0 评论 -
RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimen。。。
【RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimension 0】情景描述:在使用PyTorch搭建好的Lenet图像分类网络进行预测时候,输入的一张预测照片不是32×32的大小,im = Image.open('text.jpg') # 不是32*32像素代码中有进行resize()为32×32的步骤,transform = transforms.原创 2021-06-05 09:34:56 · 4005 阅读 · 0 评论 -
Why “the CUDA Samples are not meant for performance measurements”?
“the CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled”情景:相关问题:解答:情景:使用bandwidthTest.exe测量CUDA内存带宽,提示:“the CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enab原创 2021-04-21 21:03:56 · 2547 阅读 · 0 评论 -
解决VScode中使用cout报错
解决VScode中使用cout报错BUG描述尝试的解决方法:①②BUG描述更改了c++的开发工具,从 codeblocks 换到 VS code :运行 :#include using namespace std;…cout << " ******* " << endl ;报错尝试的解决方法:①更改 cout 格式 :std::cout<<****<<std::endl;②提前进行cout,cin等格式的声明:…usi原创 2021-01-23 21:56:20 · 7442 阅读 · 0 评论 -
ValueError: cannot reshape array of size 60654 into shape (264,256,1,1)
ValueError: cannot reshape array of size 60654 into shape (264,256,1,1);tensorflow.python.framework.errors_impl.UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log原创 2020-11-18 10:51:14 · 4582 阅读 · 0 评论 -
OpenCV读取图片时 error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘cv::imshow‘
OpenCV读取图片时error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘cv::imshow’这个报错的原因是:读入的图片路径不对,或者出现了中文命名,检查路径 / 修改命名为英文或者数字...原创 2020-09-03 16:23:41 · 9504 阅读 · 0 评论 -
OpenCV-python运行代码中报错TypeError: Required argument ‘winname‘ (pos 1) not found的原因和解决办法
OpenCV-python运行代码中报错TypeError: Required argument ‘winname’ (pos 1) not found的原因和解决办法在PyCharm中运行OpenCV相关代码报错了,原因是:调用的函数中缺少部分参数,或者没有给出参数。以读取一张图片程序举例:# 代码描述: 演示 TypeError: Required argument 'winname' (pos 1) not found 报错# # 创建时间: 2020-8-31# 创建人: Kenn W原创 2020-08-31 21:27:38 · 6163 阅读 · 0 评论