上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 73 下一页
摘要: import torch x = torch.randn(3,1,4,1,2) a = x.squeeze(dim=1) # 成员函数删除第二维度 print(a.shape) b = torch.squeeze(x, dim=1) # torch自带函数删除第二维度 print(b.shape) 阅读全文
posted @ 2022-03-30 19:04 Tomorrow1126 阅读(1076) 评论(0) 推荐(0) 编辑
摘要: import os path=os.getcwd() #返回当前进程的工作目录 path_list=os.listdir(path) path_list.sort(key=lambda x:int(x[:-4])) #将'.jpg'左边的字符转换成整数型进行排序 print(path_list) 输 阅读全文
posted @ 2022-03-30 10:25 Tomorrow1126 阅读(130) 评论(0) 推荐(0) 编辑
摘要: import torch from torchvision import transforms toPIL = transforms.ToPILImage() #这个函数可以将张量转为PIL图片,由小数转为0-255之间的像素值 img = torch.randn(3,128,64) pic = t 阅读全文
posted @ 2022-03-30 10:23 Tomorrow1126 阅读(1818) 评论(0) 推荐(0) 编辑
摘要: 数据增强(Data Augmentation)的目的与作用卷积神经网络能够鲁棒地将物体分类,即便物体放置在不同的方向上,这也就是所说不变性的性质,即使卷积神经网络被放在不同方向上,它也能进行对象分类。更具体的说,卷积神经网络对平移、视角、尺寸或照度(或以上组合)保持不变性。这就是数据增强的本质前提。 阅读全文
posted @ 2022-03-29 19:31 Tomorrow1126 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 这个链接很详细:https://blog.csdn.net/lz0499/article/details/101626098 抖动是通过错位的位移对图像产生的一种特殊效果:三者针对的目标分别为色相、亮度和饱和度。色彩抖动通过对构成图像的色相产生位移,造成临近点状差异的色彩交叉效果;饱和度抖动,饱和度 阅读全文
posted @ 2022-03-29 14:35 Tomorrow1126 阅读(800) 评论(0) 推荐(0) 编辑
摘要: 举例: >>> x = torch.randn(2, 3, 5) >>> x.size() torch.Size([2, 3, 5]) >>> x.permute(2, 0, 1).size() torch.Size([5, 2, 3]) https://zhuanlan.zhihu.com/p/7 阅读全文
posted @ 2022-03-29 11:19 Tomorrow1126 阅读(79) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/564ca3994482 https://blog.csdn.net/qq_23664173/article/details/83010348 https://www.cnblogs.com/xuexuefirst/p/8858274.html 1 阅读全文
posted @ 2022-03-28 19:52 Tomorrow1126 阅读(547) 评论(0) 推荐(0) 编辑
摘要: 参数: -q:v 2 表示输出的图片质量,一般是1到5之间(1 为质量最高) 阅读全文
posted @ 2022-03-28 19:41 Tomorrow1126 阅读(1344) 评论(0) 推荐(0) 编辑
摘要: import os import shutil def diff_file(path1, path2): path = 'newnew' fileName1 = set([_ for _ in os.listdir(path1)]) fileName2 = set([_ for _ in os.li 阅读全文
posted @ 2022-03-28 10:27 Tomorrow1126 阅读(1327) 评论(0) 推荐(1) 编辑
摘要: ls -l|grep "^d"| wc -l 阅读全文
posted @ 2022-03-25 19:26 Tomorrow1126 阅读(44) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 73 下一页