当前位置: 首页 > wzjs >正文

外贸网站建设评价571免费建网站

外贸网站建设评价,571免费建网站,六安人论坛最新招聘,夫唯seo怎么样模块出处 [TIP 21] [link] CoANet: Connectivity Attention Network for Road Extraction From Satellite Imagery 模块名称 Strip Convolution Block (SCB) 模块作用 多方向条形特征提取 模块结构 模块特点 类PSP设计,采用四个并行分支提取不同维度的信息相比于…
模块出处

[TIP 21] [link] CoANet: Connectivity Attention Network for Road Extraction From Satellite Imagery


模块名称

Strip Convolution Block (SCB)


模块作用

多方向条形特征提取


模块结构

在这里插入图片描述


模块特点
  • 类PSP设计,采用四个并行分支提取不同维度的信息
  • 相比于经典的横向/纵向条形卷积,引入了两种斜方向的卷积来更好的学习斜向线条

模块代码
import torch
import torch.nn as nn
import torch.nn.functional as Fclass SCB(nn.Module):def __init__(self, in_channels, n_filters):super(SCB, self).__init__()self.conv1 = nn.Conv2d(in_channels, in_channels // 4, 1)self.bn1 = nn.BatchNorm2d(in_channels // 4)self.relu1 = nn.ReLU()self.deconv1 = nn.Conv2d(in_channels // 4, in_channels // 8, (1, 9), padding=(0, 4))self.deconv2 = nn.Conv2d(in_channels // 4, in_channels // 8, (9, 1), padding=(4, 0))self.deconv3 = nn.Conv2d(in_channels // 4, in_channels // 8, (9, 1), padding=(4, 0))self.deconv4 = nn.Conv2d(in_channels // 4, in_channels // 8, (1, 9), padding=(0, 4))self.bn2 = nn.BatchNorm2d(in_channels // 4 + in_channels // 4)self.relu2 = nn.ReLU()self.conv3 = nn.Conv2d(in_channels // 4 + in_channels // 4, n_filters, 1)self.bn3 = nn.BatchNorm2d(n_filters)self.relu3 = nn.ReLU()def forward(self, x):x = self.conv1(x)x = self.bn1(x)x = self.relu1(x)x1 = self.deconv1(x)x2 = self.deconv2(x)x3 = self.inv_h_transform(self.deconv3(self.h_transform(x)))x4 = self.inv_v_transform(self.deconv4(self.v_transform(x)))x = torch.cat((x1, x2, x3, x4), 1)x = self.bn2(x)x = self.relu2(x)x = self.conv3(x)x = self.bn3(x)x = self.relu3(x)return xdef h_transform(self, x):shape = x.size()x = torch.nn.functional.pad(x, (0, shape[-1]))x = x.reshape(shape[0], shape[1], -1)[..., :-shape[-1]]x = x.reshape(shape[0], shape[1], shape[2], 2*shape[3]-1)return xdef inv_h_transform(self, x):shape = x.size()x = x.reshape(shape[0], shape[1], -1).contiguous()x = torch.nn.functional.pad(x, (0, shape[-2]))x = x.reshape(shape[0], shape[1], shape[-2], 2*shape[-2])x = x[..., 0: shape[-2]]return xdef v_transform(self, x):x = x.permute(0, 1, 3, 2)shape = x.size()x = torch.nn.functional.pad(x, (0, shape[-1]))x = x.reshape(shape[0], shape[1], -1)[..., :-shape[-1]]x = x.reshape(shape[0], shape[1], shape[2], 2*shape[3]-1)return x.permute(0, 1, 3, 2)def inv_v_transform(self, x):x = x.permute(0, 1, 3, 2)shape = x.size()x = x.reshape(shape[0], shape[1], -1)x = torch.nn.functional.pad(x, (0, shape[-2]))x = x.reshape(shape[0], shape[1], shape[-2], 2*shape[-2])x = x[..., 0: shape[-2]]return x.permute(0, 1, 3, 2)if __name__ == '__main__':x = torch.randn([1, 64, 44, 44])scb = SCB(in_channels=64, n_filters=64)out = scb(x)print(out.shape)  # [1, 64, 44, 44]
http://www.dtcms.com/wzjs/577366.html

相关文章:

  • 柯桥建设局网站百度快照 查看指定网站
  • 缩短链接的网站域名备案查询
  • 合肥能做网站的公司做网站电脑开一天用多少钱
  • 网站建设 应酷wordpress增加分页功能
  • 东昌网站建设公司wordpress企业主题免费
  • 网站排名查询软件游戏公司官方网站模版
  • div嵌套影响网站收录南昌污水厂最新数据
  • 天梯网站建设中国城乡建设结合部网站
  • 小公司怎样自己建网站wamp做的网站标签图标
  • 南阳网站制作算命网站怎么做
  • 网站怎么找响应式网站的好处
  • 美的网站建设电子工程王力卓
  • 长春做网站的汉子由来 外国人做的网站
  • 济南正规的网站制作福建省建设厅网站人员
  • 北京网站建设网站改版的费用聚名网备案查询
  • 专门做优惠劵的网站wap 网站开发
  • 企业网站模板下载哪家口碑好企业如何在自己的网站上做宣传
  • 建材招商网站网站建设公司ejiew
  • 哪个网站做的win10系统好网站建设2017国内排行
  • 如何做能放照片的网站八桂云网站建设
  • 克拉玛依做网站承德市网站开发
  • 自己做网站都要什么新手建网站需要怎么做呢
  • 学做包子馒头的网站品牌推广营销平台
  • 刚做的网站怎么收录百度自助网站建设
  • 网站建设软件kan遵义在线新闻
  • 婚纱摄影网站开发背景亚马逊雨林生物
  • 网站开发方式包括实验室网站建设意义
  • 金阳龙泉苑网站建设最近时事热点新闻事件
  • 信息科技有限公司网站建设品牌网站建设特色
  • 市场上网站开发价格广州网络推广万企在线