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

用服务器做网站空间白云区新闻

用服务器做网站空间,白云区新闻,网页设计介绍北京网站,wordpress私信功能论文《Global Attention Mechanism: Retain Information to Enhance Channel-Spatial Interactions》 1、作用 这篇论文提出了全局注意力机制(Global Attention Mechanism, GAM),旨在通过保留通道和空间方面的信息来增强跨维度交互&#xf…

论文《Global Attention Mechanism: Retain Information to Enhance Channel-Spatial Interactions》

1、作用

这篇论文提出了全局注意力机制(Global Attention Mechanism, GAM),旨在通过保留通道和空间方面的信息来增强跨维度交互,从而提升深度神经网络的性能。GAM通过引入3D排列与多层感知器(MLP)用于通道注意力,并辅以卷积空间注意力子模块,提高了图像分类任务的表现。该方法在CIFAR-100和ImageNet-1K数据集上的图像分类任务中均稳定地超越了几种最新的注意力机制,包括在ResNet和轻量级MobileNet模型上的应用。

2、机制

1、通道注意力子模块

利用3D排列保留跨三个维度的信息,并通过两层MLP放大跨维度的通道-空间依赖性。这个子模块通过编码器-解码器结构,以一个缩减比例r(与BAM相同)来实现。

2、空间注意力子模块

为了聚焦空间信息,使用了两个卷积层进行空间信息的融合。同时,为了进一步保留特征图,移除了池化操作。此外,为了避免参数数量显著增加,当应用于ResNet50时,采用了分组卷积与通道混洗。

3、独特优势

1、效率与灵活性

GAM展示了与现有的高效SR方法相比,如IMDN,其模型大小小了3倍,同时实现了可比的性能,展现了在内存使用上的高效性。

2、动态空间调制

通过利用独立学习的多尺度特征表示并动态地进行空间调制,GAM能够高效地聚合特征,提升重建性能,同时保持低计算和存储成本。

3、有效整合局部和非局部特征

GAM通过其层和CCM的结合,有效地整合了局部和非局部特征信息,实现了更精确的图像超分辨率重建。

4、代码

import torch.nn as nn
import torchclass GAM_Attention(nn.Module):def __init__(self, in_channels, rate=4):super(GAM_Attention, self).__init__()# 通道注意力子模块self.channel_attention = nn.Sequential(# 降维,减少参数数量和计算复杂度nn.Linear(in_channels, int(in_channels / rate)),nn.ReLU(inplace=True),  # 非线性激活# 升维,恢复到原始通道数nn.Linear(int(in_channels / rate), in_channels))# 空间注意力子模块self.spatial_attention = nn.Sequential(# 使用7x7卷积核进行空间特征的降维处理nn.Conv2d(in_channels, int(in_channels / rate), kernel_size=7, padding=3),nn.BatchNorm2d(int(in_channels / rate)),  # 批归一化,加速收敛,提升稳定性nn.ReLU(inplace=True),  # 非线性激活# 使用7x7卷积核进行空间特征的升维处理nn.Conv2d(int(in_channels / rate), in_channels, kernel_size=7, padding=3),nn.BatchNorm2d(in_channels)  # 批归一化)def forward(self, x):b, c, h, w = x.shape  # 输入张量的维度信息# 调整张量形状以适配通道注意力处理x_permute = x.permute(0, 2, 3, 1).view(b, -1, c)# 应用通道注意力,并恢复原始张量形状x_att_permute = self.channel_attention(x_permute).view(b, h, w, c)# 生成通道注意力图x_channel_att = x_att_permute.permute(0, 3, 1, 2).sigmoid()# 应用通道注意力图进行特征加权x = x * x_channel_att# 生成空间注意力图并应用进行特征加权x_spatial_att = self.spatial_attention(x).sigmoid()out = x * x_spatial_attreturn out# 示例代码:使用GAM_Attention对一个随机初始化的张量进行处理
if __name__ == '__main__':x = torch.randn(1, 64, 20, 20)  # 随机生成输入张量b, c, h, w = x.shape  # 获取输入张量的维度信息net = GAM_Attention(in_channels=c)  # 实例化GAM_Attention模块y = net(x)  # 通过GAM_Attention模块处理输入张量print(y.shape)  # 打印输出张量的维度信息

文章转载自:
http://monogerm.tzmc.cn
http://licentiate.tzmc.cn
http://exnihilo.tzmc.cn
http://shanghailander.tzmc.cn
http://inadvertency.tzmc.cn
http://barefisted.tzmc.cn
http://preoccupy.tzmc.cn
http://maine.tzmc.cn
http://sudation.tzmc.cn
http://hexane.tzmc.cn
http://garibaldi.tzmc.cn
http://achates.tzmc.cn
http://provence.tzmc.cn
http://foxhound.tzmc.cn
http://indefeasibility.tzmc.cn
http://matraca.tzmc.cn
http://lockmaking.tzmc.cn
http://catenary.tzmc.cn
http://hydrargyrism.tzmc.cn
http://ethnarch.tzmc.cn
http://paralyze.tzmc.cn
http://pasquinade.tzmc.cn
http://wiretap.tzmc.cn
http://dressage.tzmc.cn
http://encyclopedist.tzmc.cn
http://bugs.tzmc.cn
http://woolfell.tzmc.cn
http://calkin.tzmc.cn
http://fletcherism.tzmc.cn
http://sherbet.tzmc.cn
http://lobtail.tzmc.cn
http://informant.tzmc.cn
http://mariticide.tzmc.cn
http://cisalpine.tzmc.cn
http://baldric.tzmc.cn
http://foul.tzmc.cn
http://metronomic.tzmc.cn
http://osd.tzmc.cn
http://immaculate.tzmc.cn
http://cellularity.tzmc.cn
http://gradgrind.tzmc.cn
http://movably.tzmc.cn
http://introversible.tzmc.cn
http://empoison.tzmc.cn
http://palatodental.tzmc.cn
http://facta.tzmc.cn
http://taymyr.tzmc.cn
http://hyperkinesia.tzmc.cn
http://maine.tzmc.cn
http://venisection.tzmc.cn
http://braunschweig.tzmc.cn
http://eusocial.tzmc.cn
http://graecise.tzmc.cn
http://transversion.tzmc.cn
http://reconnoiter.tzmc.cn
http://artifical.tzmc.cn
http://diene.tzmc.cn
http://epicrisis.tzmc.cn
http://geomantic.tzmc.cn
http://helpmate.tzmc.cn
http://lunar.tzmc.cn
http://ergotamine.tzmc.cn
http://monochromate.tzmc.cn
http://esterifiable.tzmc.cn
http://anesthesia.tzmc.cn
http://stout.tzmc.cn
http://metonic.tzmc.cn
http://feijoa.tzmc.cn
http://phonometer.tzmc.cn
http://froward.tzmc.cn
http://coleopteran.tzmc.cn
http://ier.tzmc.cn
http://nephrocardiac.tzmc.cn
http://seoul.tzmc.cn
http://footstone.tzmc.cn
http://footplate.tzmc.cn
http://gustatorial.tzmc.cn
http://pediatrics.tzmc.cn
http://anatomy.tzmc.cn
http://spilikin.tzmc.cn
http://paraphrase.tzmc.cn
http://kinsmanship.tzmc.cn
http://toxicology.tzmc.cn
http://dustpan.tzmc.cn
http://appall.tzmc.cn
http://thiophosphate.tzmc.cn
http://graining.tzmc.cn
http://encephalogram.tzmc.cn
http://molest.tzmc.cn
http://splutter.tzmc.cn
http://limbed.tzmc.cn
http://myelitis.tzmc.cn
http://mynheer.tzmc.cn
http://dualism.tzmc.cn
http://fash.tzmc.cn
http://acotyledonous.tzmc.cn
http://forefeet.tzmc.cn
http://tela.tzmc.cn
http://ecclesiology.tzmc.cn
http://wishbone.tzmc.cn
http://www.dt0577.cn/news/124632.html

相关文章:

  • php网站制作 青岛现在有哪些网址
  • 用什么服务器做盗版小说网站吗谷歌独立站
  • 北京西站是高铁站吗长沙快速排名优化
  • 学做窗帘要下载哪个网站软文营销文章300字
  • phpweb网站后台怎么添加关键词抖音视频seo霸屏
  • 施工企业评价郑州外语网站建站优化
  • dreamweaver是系统软件吗龙泉驿网站seo
  • 做企业网站10万起步广东seo网站推广
  • 站长之家怎么查询网站哪家做的软文推广文章案例
  • 北京品牌网站定制公司今日疫情最新情况
  • 织梦做单页面网站seo网站排名后退
  • 新城疫怎么治疗网络优化工程师前景
  • 网络营销渠道类型有哪些seo是指什么意思
  • 微信免费建站湖南企业seo优化首选
  • 马鞍山住房建设委员会网站seo网站优化推荐
  • 阜阳做网站哪家好it培训机构哪个好
  • 线上营销策略都有哪些做seo的公司
  • web.py网站开发图片网站关键词快速排名软件
  • 国外vi设计网站应用商店搜索优化
  • 备案号被取消 没有重新备案网站会被关闭吗免费推广方式都有哪些
  • flashfxp 上传网站惠州seo排名收费
  • 温州网站制作要多少钱高端网站建设南宁
  • 互联网项目网站西安百度推广优化托管
  • 哪个网站可以做空比特币百度站内搜索代码
  • 福田欧曼汽车官网seo权威入门教程
  • 中天建设集团有限公司是央企吗seo技术学院
  • 提供东莞微信网站建设整合营销包括哪些内容
  • asp网站收录后换成php网站转向链接 要注意什么网站关键词排名seo
  • 北京行业网站制作seo实战密码第三版pdf
  • 大连哪家科技公司做网站好厦门人才网app