会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
青春无悔,我在路上
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
···
13
下一页
2022年9月14日
激活函数深入理解
摘要: 一. Relu嵌套效果 f = lambda x: (F.relu(2 * (F.relu(3 * x - 1)) + 3)) x = torch.arange(-50, 50, 0.5) mb.plt.plot(x, f(x)) 可以看出多个Relu的嵌套之后结果仍然为一个Relu函数。 二. R
阅读全文
posted @ 2022-09-14 09:07 SXQ-BLOG
阅读(131)
评论(0)
推荐(0)
2022年9月13日
转置卷积
摘要: 一. 基本操作 不同于一般的卷积做的是多个元素->1个元素,转置卷积是从1个元素到多个元素 二. 填充、步幅和多通道 1. 填充 常规卷积中padding是在输入的外圈添加元素,转置卷积中的padding则是在输出中删除外圈的元素 x = torch.tensor([[0.0, 1.0], [2.0
阅读全文
posted @ 2022-09-13 21:14 SXQ-BLOG
阅读(1033)
评论(0)
推荐(1)
2022年9月12日
torchvision.transforms.Normalize()(和.ToTensor()的理解
摘要: torchvision.transforms.ToTensor() 将numpy的ndarray或PIL.Image读的图片(H,W,C)转换成形状为(C,H, W)的Tensor格式,当然,需要特别注意的是,当使用ToTensor() 将numpy转为Tensor格式时,numpy中的元素必须是u
阅读全文
posted @ 2022-09-12 21:28 SXQ-BLOG
阅读(539)
评论(0)
推荐(0)
基于anaconda3的Pytorch环境搭建
摘要: 方法一 安装anaconda3,版本选择新的就行 打开anaconda prompt创建虚拟环境conda create -n pytorch_gpu python=3.9,pytorch_gpu是环境名称,可自行选取,python=3.9是选择的python版本,可自行选择,conda会自动下载选
阅读全文
posted @ 2022-09-12 11:48 SXQ-BLOG
阅读(113)
评论(0)
推荐(0)
2022年9月9日
目标检测-SSD算法从零实现
摘要: 1. 几个工具函数 def box_corner_to_center(boxes): """从(左上,右下)转换到(中间,宽度,高度)""" x1, y1, x2, y2 = boxes[:, 0], boxes[:, 1], boxes[:, 2], boxes[:, 3] cx = (x1 +
阅读全文
posted @ 2022-09-09 15:03 SXQ-BLOG
阅读(816)
评论(1)
推荐(1)
2022年9月4日
vscode主题开发
摘要: vscode主题开发教程 https://blog.csdn.net/Suwanqing_su/article/details/105945290 个人配置结果 主题代码 到Vscode放插件的目录中随便找一个主题插件点进去到themes文件夹,里面有一个json文件打开,将以下代码复制即可 /*
阅读全文
posted @ 2022-09-04 15:21 SXQ-BLOG
阅读(187)
评论(1)
推荐(0)
2022年9月1日
torch.sort 和 torch.argsort
摘要: 定义 torch.sort(input,dim,descending) torch.argsort(input,dim,descending) 用法 torch.sort:对输入数据排序,返回两个值,即排序后的数据values和其在原矩阵中的坐标indices torch.argsort:同torc
阅读全文
posted @ 2022-09-01 20:18 SXQ-BLOG
阅读(969)
评论(0)
推荐(0)
torch.max与torch.argmax
摘要: 形式: torch.max(input) → Tensor 返回输入tensor中所有元素的最大值: a = torch.randn(1, 3) >>0.4729 -0.2266 -0.2085 torch.max(a) #也可以写成a.max() >>0.4729 形式: torch.max(in
阅读全文
posted @ 2022-09-01 08:38 SXQ-BLOG
阅读(1257)
评论(0)
推荐(0)
torch.nonzero()
摘要: https://pytorch.org/docs/stable/generated/torch.nonzero.html
阅读全文
posted @ 2022-09-01 08:36 SXQ-BLOG
阅读(34)
评论(0)
推荐(0)
2022年8月31日
Python中None作为索引的作用
摘要: None的作用主要是在使用None的位置新增一个维度。 a = np.arange(25).reshape(5,5) print(a) ''' [[ 0 1 2 3 4] [ 5 6 7 8 9] [10 11 12 13 14] [15 16 17 18 19] [20 21 22 23 24]]
阅读全文
posted @ 2022-08-31 20:46 SXQ-BLOG
阅读(346)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
13
下一页
公告