torch.nn.Conv2d()使用
2024-08-27 19:23:19
API
输入:[ batch_size, channels, height_1, width_1 ]
Conv2d输入参数:[ channels, output, height_2, width_2 ]
输出:[ batch_size,output, height_3, width_3 ]
实例:
def torch_practice():
x = torch.randn(2,1,16,4)
conv = torch.nn.Conv2d(1, 32, (2,2))
res = conv(x)
print(res.shape) if __name__ == '__main__':
torch_practice()
输出:torch.Size([2, 32, 15, 3])
batch大小不变:2
输出通道加厚:32。由卷积核的通道数决定
卷积结果:[15,3]。计算公式,n-m+1, 16-2+1=15
最新文章
- Android自定义控件之自定义ViewGroup实现标签云
- typedef函数指针使用方法
- 《Linux系统 date、cal、hwclock时间命令的用法》
- PC问题-(仅供备用)取消磁盘的自动扫描
- Ubuntu12.04下eclipse提示框黑色背景色的修改方法
- Contact类解析
- awk 用法小结
- Java继承--子父类中的构造函数
- ●BZOJ 1853 [Scoi2010]幸运数字
- NOIP-珠心算
- 使用cmd查看电脑连接过的wifi密码(二)
- PyQT5-QCalendarWidget 日历显示
- VUE之文字跑马灯效果
- datagrid在MVC中的运用02-结合搜索
- Comet技术在Java Web中的应用
- windows查看当前python的版本
- 完美解决wordpress邮件链接无效的问题
- 实战DeviceIoControl系列之四:获取硬盘的详细信息
- 字符串处理scanf(";%d%*c";,&;n);
- C# chart.DataManipulator.FinancialFormula()公式的使用 线性回归预测方法
热门文章
- C++中函数访问数组的方式
- Linux centosVMware iptables规则备份和恢复、firewalld的9个zone、firewalld关于zone的操作、firewalld关于service的操作
- 随机游走模型(Random Walk)
- Spring 各个组件架构
- PostgreSQL存取jsonb
- python--一起来盖个时间戳!!
- 一 SSH整合:Spring整合Struts2的两种方式,struts.xml管理Action&;Bean管理Action
- 吴裕雄 Bootstrap 前端框架开发——Bootstrap 按钮
- PIL pip error
- SpringCloud 跨域访问cors