调bug
yijun009
这个作者很懒,什么都没留下…
展开
-
dataloader报错OSError: [Errno 16] Device or resource busy: ‘.nfs00000000087c7062000001de‘
本来运行得好好的代码,突然报错 OSError: [Errno 16] Device or resource busy: ‘.nfs00000000087c7062000001de’并且生成一堆以pymp-开头命名的一堆文件夹。一步一步调试后发现,是在:for img,gt in self.train_dataloder这一步报错。查阅资料得知,这是由于有人搬动了临时文件。由于linux服务器是共享的,也不知道是谁搬的,没有root权限,解决办法也看不太明白,但是找到一个简单粗暴的方法,那就是换原创 2021-11-23 16:48:13 · 2660 阅读 · 0 评论 -
no module named XXX
eg:no module named transformers明明安装了报错说没有安装第一:检查安装的虚拟环境对不对第二:用which pip看看用的pip对不对,到anaconda3/envs/自己的环境名下/bin这个目录下,看看有没有pip文件。或者改个特殊的名字,免得用错。比如pip_lyjpig。参考:https://github.com/huggingface/transformers/issues/2478...原创 2021-10-22 13:24:37 · 184 阅读 · 0 评论 -
2021-08-30 创建tensor时,注意不要让梯度消失了
data = torch.tensor([[0,0],[x1,y1],[x2,y2],[1,1]],requires_grad=True).cuda()原创 2021-08-30 10:41:22 · 612 阅读 · 0 评论 -
python str 的 + 与os.path.join 的区别
在涉及到文件地址的处理时,都用os.path.join,至少不出错。后面补充为什么。顺便说一下:str1.split( ‘to_be_matched’ )'to_be_matched’这里必须是一个字符串,不能是‘a’+‘b’这种原创 2021-08-12 15:37:30 · 392 阅读 · 0 评论 -
在使用cityscapes数据集时遇到报错,No module named cityscapesscripts
在使用cityscapes数据集时遇到报错,No module named ‘cityscapesscripts’,这个问题看起来很傻,但是拦住了我这个新手,写出来希望能给人参考。参考文档:https://blog.csdn.net/wang27623056/article/details/106631196/?utm_medium=distribute.pc_relevant.none-task-blog-baidujs-2https://www.cnblogs.com/leviatan/p/106原创 2020-06-20 15:34:36 · 4385 阅读 · 1 评论 -
手动将matlab代码改成python代码的坑
目录读取图片是可能会出现误差的!下标问题:图像保存问题:其他的一些对应操作(第一行为matlab,第二行为python)matlab初始化一个数组可以用其他数组,numpy不可以读取图片是可能会出现误差的!matlab:image_I = imread('0.jpg');image_I = rgb2gray(image_I);python:image_I= cv2.imread('0.jpg',0)这两张灰度图,如果对它们的像素进行求和,不好意思,不一样!因为图片大,所以相差这么多是正常的原创 2020-06-05 21:44:46 · 2548 阅读 · 0 评论 -
奇奇怪怪的bug
numpy初始化不能用其他numpy变量初始化,因为会改变原来变量的值原创 2020-06-05 17:00:42 · 214 阅读 · 0 评论 -
远程用服务器
https://blog.csdn.net/u013452337/article/details/81807184运行之前,防止服务器进程被杀掉,命令前需要加入nohup,输入:nohup ./frpc -c ./frpc.ini然后关掉窗口也没问题最后用WinSsh来管理文件。...原创 2020-02-08 20:47:29 · 97 阅读 · 0 评论 -
mxnet_cu90 OSError: libcudart.so.9.0: cannot open shared object file 无sudo权限
mxnet_cu90 OSError: libcudart.so.9.0: cannot open shared object file 无sudo权限,网络上很多解决方案要求sudo权限,而我没有。解决办法:出现一次这种错误,命令行依次输入下面三条指令,临时解决问题。export PATH=$PATH:/usr/local/cuda-9.0/binexport LD_LIBRARY_PAT...原创 2020-01-12 22:32:04 · 351 阅读 · 0 评论 -
The environment is inconsistent, please check the package plan carefully The following packages are
The environment is inconsistent, please check the package plan carefully The following packages are causing the inconsistency问题:anaconda安装包时,The environment is inconsistent, please check the package ...原创 2020-01-09 22:23:08 · 5428 阅读 · 2 评论