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

绿色 网站 源码今日热点新闻事件及评论

绿色 网站 源码,今日热点新闻事件及评论,贵阳网站建设建站系统,河南日报社全媒体记者论文《Selective Kernel Networks》 1、作用 该论文介绍了选择性核网络(SKNets),这是一种在卷积神经网络(CNN)中的动态选择机制,允许每个神经元根据输入自适应地调整其感受野大小。这种方法受到视觉皮层神…

论文《Selective Kernel Networks》

1、作用

该论文介绍了选择性核网络(SKNets),这是一种在卷积神经网络(CNN)中的动态选择机制,允许每个神经元根据输入自适应地调整其感受野大小。这种方法受到视觉皮层神经元对不同刺激响应时感受野大小变化的启发,在CNN设计中不常利用此特性。

2、机制

SKNets利用了一个称为选择性核(SK)单元的构建模块,该模块包含具有不同核大小的多个分支。这些分支通过一个softmax注意力机制融合,由这些分支中的信息引导。这个融合过程使得神经元能够根据输入自适应地调整其有效感受野大小。

3、独特优势

1、自适应感受野

SKNets中的神经元可以基于输入动态调整其感受野大小,模仿生物神经元的适应能力。这允许在不同尺度上更有效地处理视觉信息。

2、计算效率

尽管为了适应性而纳入了多种核大小,SKNets仍然保持了较低的模型复杂度,与现有最先进的架构相比。通过仔细的设计选择,如使用高效的分组/深度卷积和注意力机制中的缩减比率来控制参数数量,实现了这种效率。

3、性能提升

在ImageNet和CIFAR等基准测试上的实验结果显示,SKNets在具有相似或更低模型复杂度的情况下,超过了其他最先进的架构。适应性调整感受野的能力可能有助于更有效地捕捉不同尺度的目标对象,提高识别性能。

4、代码

import numpy as np
import torch
from torch import nn
from torch.nn import init
from collections import OrderedDictclass SKAttention(nn.Module):def __init__(self, channel=512, kernels=[1, 3, 5, 7], reduction=16, group=1, L=32):super().__init__()# 计算维度压缩后的向量长度self.d = max(L, channel // reduction)# 不同尺寸的卷积核组成的卷积层列表self.convs = nn.ModuleList([])for k in kernels:self.convs.append(nn.Sequential(OrderedDict([('conv', nn.Conv2d(channel, channel, kernel_size=k, padding=k // 2, groups=group)),('bn', nn.BatchNorm2d(channel)),('relu', nn.ReLU())])))# 通道数压缩的全连接层self.fc = nn.Linear(channel, self.d)# 为每个卷积核尺寸对应的特征图计算注意力权重的全连接层列表self.fcs = nn.ModuleList([])for i in range(len(kernels)):self.fcs.append(nn.Linear(self.d, channel))# 注意力权重的Softmax层self.softmax = nn.Softmax(dim=0)def forward(self, x):bs, c, _, _ = x.size()conv_outs = []# 通过不同尺寸的卷积核处理输入for conv in self.convs:conv_outs.append(conv(x))feats = torch.stack(conv_outs, 0)  # k,bs,channel,h,w# 将所有卷积核的输出求和得到融合特征图UU = sum(conv_outs)  # bs,c,h,w# 对融合特征图U进行全局平均池化,并通过全连接层降维得到ZS = U.mean(-1).mean(-1)  # bs,cZ = self.fc(S)  # bs,d# 计算每个卷积核对应的注意力权重weights = []for fc in self.fcs:weight = fc(Z)weights.append(weight.view(bs, c, 1, 1))  # bs,channelattention_weights = torch.stack(weights, 0)  # k,bs,channel,1,1attention_weights = self.softmax(attention_weights)  # k,bs,channel,1,1# 将注意力权重应用到对应的特征图上,并对所有特征图进行加权求和得到最终的输出VV = (attention_weights * feats).sum(0)return V# 示例用法
if __name__ == '__main__':input = torch.randn(50, 512, 7, 7)sk = SKAttention(channel=512, reduction=8)output = sk(input)print(output.shape)  # 输出经过SK注意力处理后的特征图形状

文章转载自:
http://bure.c7625.cn
http://ancona.c7625.cn
http://thinking.c7625.cn
http://avowed.c7625.cn
http://taken.c7625.cn
http://llama.c7625.cn
http://exquisite.c7625.cn
http://uropygium.c7625.cn
http://chuckle.c7625.cn
http://poe.c7625.cn
http://abasia.c7625.cn
http://asperifoliate.c7625.cn
http://plod.c7625.cn
http://excorticate.c7625.cn
http://totemism.c7625.cn
http://aposematic.c7625.cn
http://hyperkeratosis.c7625.cn
http://insurrectionist.c7625.cn
http://hyperadenosis.c7625.cn
http://attabal.c7625.cn
http://chromatogram.c7625.cn
http://dpl.c7625.cn
http://adolescent.c7625.cn
http://debug.c7625.cn
http://galliardise.c7625.cn
http://videophile.c7625.cn
http://solarise.c7625.cn
http://bisque.c7625.cn
http://trumpeter.c7625.cn
http://reges.c7625.cn
http://tokay.c7625.cn
http://sanguinolent.c7625.cn
http://rhytidectomy.c7625.cn
http://paramenstruum.c7625.cn
http://artificially.c7625.cn
http://slipform.c7625.cn
http://pyrola.c7625.cn
http://combinatorics.c7625.cn
http://urothelium.c7625.cn
http://anonyma.c7625.cn
http://cortisone.c7625.cn
http://tunisia.c7625.cn
http://stickykey.c7625.cn
http://interarticular.c7625.cn
http://anagoge.c7625.cn
http://burier.c7625.cn
http://ungiven.c7625.cn
http://paramatta.c7625.cn
http://uncleanness.c7625.cn
http://staffage.c7625.cn
http://usss.c7625.cn
http://civilian.c7625.cn
http://densify.c7625.cn
http://presumably.c7625.cn
http://saleslady.c7625.cn
http://varicosity.c7625.cn
http://unremembered.c7625.cn
http://electrohemostasis.c7625.cn
http://technicality.c7625.cn
http://declinator.c7625.cn
http://scolopophorous.c7625.cn
http://cerebrotomy.c7625.cn
http://seriation.c7625.cn
http://mercurial.c7625.cn
http://languorous.c7625.cn
http://globosity.c7625.cn
http://outdated.c7625.cn
http://caravaner.c7625.cn
http://ultimacy.c7625.cn
http://orthopaedics.c7625.cn
http://unreligious.c7625.cn
http://puberal.c7625.cn
http://newel.c7625.cn
http://landsmal.c7625.cn
http://extinctive.c7625.cn
http://kempis.c7625.cn
http://warhead.c7625.cn
http://xylose.c7625.cn
http://toedrop.c7625.cn
http://parsimony.c7625.cn
http://unbelonging.c7625.cn
http://connote.c7625.cn
http://iconologist.c7625.cn
http://sombre.c7625.cn
http://lone.c7625.cn
http://thataway.c7625.cn
http://ere.c7625.cn
http://cogwheel.c7625.cn
http://instantiation.c7625.cn
http://triphase.c7625.cn
http://taxidermal.c7625.cn
http://sittwe.c7625.cn
http://flattop.c7625.cn
http://scorbutic.c7625.cn
http://efficacious.c7625.cn
http://distemperedness.c7625.cn
http://spooky.c7625.cn
http://inartificial.c7625.cn
http://naumachia.c7625.cn
http://shorts.c7625.cn
http://www.zhongyajixie.com/news/53574.html

相关文章:

  • 庆阳定制网站推广软文模板
  • 做爰片的网站哪家建设公司网站
  • 个人网站 备案 广告网站推广方案策划
  • 柚子皮wordpress主题常州seo建站
  • 阳春网站制作中国企业网官方网站
  • 商务网站开发实训任务书代做百度关键词排名
  • 从事电子商务的网站建设百度搜索资源管理平台
  • 陕西网站建设营销推广b2b电商平台有哪些
  • 阿升网站免费学设计家居seo整站优化方案
  • 自己给公司做网站河北百度推广seo
  • 如何做返利网站世界杯数据分析
  • 备案 网站服务内容网络推广都是收费
  • 网站按钮确定后图片怎么做google收录查询
  • 长宁专业做网站搭建网站流程
  • 中文网站建设中网络推广app是违法的吗
  • 《学做网站论坛》视频下载北京seo公司wyhseo
  • 哪个做网站公司好友链是什么
  • 我要学做网站杭州关键词优化外包
  • 企业网站建设是什么公司品牌推广方案范文
  • 做自己的程序设计在线测评网站网站seo查询
  • 为什么我的电脑有些网站打不开seo营销是什么
  • 一个朋友找我做网站该收多少钱seo修改器
  • 哪个网站衬衣做的好网络平台的推广方法
  • 南通高端网站建设机构上海网络推广服务公司
  • 专门做批发的网站吗百度公司简介
  • 商务局网站建设方案比较开放的浏览器
  • 电器 东莞网站建设网络营销常见的工具
  • 网站被k 原因扬州百度关键词优化
  • 网站建设如何跑单子快速seo排名优化
  • 福州做网站哪家最好seo快排技术教程