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

专业网站建设官网百度收录查询工具

专业网站建设官网,百度收录查询工具,坪山附近公司做网站建设哪家效益快,贵州网站建设设计公司特征提取是数据分析和机器学习中的基本概念,是将原始数据转换为更适合分析或建模的格式过程中的关键步骤。特征,也称为变量或属性,是我们用来进行预测、对对象进行分类或从数据中获取见解的数据点的特定特征或属性。 1.AlexNet paper&#…

特征提取是数据分析和机器学习中的基本概念,是将原始数据转换为更适合分析或建模的格式过程中的关键步骤。特征,也称为变量或属性,是我们用来进行预测、对对象进行分类或从数据中获取见解的数据点的特定特征或属性。

1.AlexNet

paper:https://dl.acm.org/doi/pdf/10.1145/3065386

作者: Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton

显然该网络是按照作者名字命名的,但是现在这个bacbone比较老了,性能欠佳

框架:

整体结构主要由五个卷积层、三个全连接层构成,中间穿插着最大池化、ReLU、Dropout

使用ReLu非线性激活函数

code_Pytorch

class AlexNet(nn.Module):"""Neural network model consisting of layers propsed by AlexNet paper."""def __init__(self, num_classes=1000):"""Define and allocate layers for this neural net.Args:num_classes (int): number of classes to predict with this model"""super().__init__()# input size should be : (b x 3 x 227 x 227)# The image in the original paper states that width and height are 224 pixels, but# the dimensions after first convolution layer do not lead to 55 x 55.self.net = nn.Sequential(nn.Conv2d(in_channels=3, out_channels=96, kernel_size=11, stride=4),  # (b x 96 x 55 x 55)nn.ReLU(),nn.LocalResponseNorm(size=5, alpha=0.0001, beta=0.75, k=2),  # section 3.3nn.MaxPool2d(kernel_size=3, stride=2),  # (b x 96 x 27 x 27)nn.Conv2d(96, 256, 5, padding=2),  # (b x 256 x 27 x 27)nn.ReLU(),nn.LocalResponseNorm(size=5, alpha=0.0001, beta=0.75, k=2),nn.MaxPool2d(kernel_size=3, stride=2),  # (b x 256 x 13 x 13)nn.Conv2d(256, 384, 3, padding=1),  # (b x 384 x 13 x 13)nn.ReLU(),nn.Conv2d(384, 384, 3, padding=1),  # (b x 384 x 13 x 13)nn.ReLU(),nn.Conv2d(384, 256, 3, padding=1),  # (b x 256 x 13 x 13)nn.ReLU(),nn.MaxPool2d(kernel_size=3, stride=2),  # (b x 256 x 6 x 6))# classifier is just a name for linear layersself.classifier = nn.Sequential(nn.Dropout(p=0.5, inplace=True),nn.Linear(in_features=(256 * 6 * 6), out_features=4096),nn.ReLU(),nn.Dropout(p=0.5, inplace=True),nn.Linear(in_features=4096, out_features=4096),nn.ReLU(),nn.Linear(in_features=4096, out_features=num_classes),)self.init_bias()  # initialize biasdef init_bias(self):for layer in self.net:if isinstance(layer, nn.Conv2d):nn.init.normal_(layer.weight, mean=0, std=0.01)nn.init.constant_(layer.bias, 0)# original paper = 1 for Conv2d layers 2nd, 4th, and 5th conv layersnn.init.constant_(self.net[4].bias, 1)nn.init.constant_(self.net[10].bias, 1)nn.init.constant_(self.net[12].bias, 1)def forward(self, x):"""Pass the input through the net.Args:x (Tensor): input tensorReturns:output (Tensor): output tensor"""x = self.net(x)x = x.view(-1, 256 * 6 * 6)  # reduce the dimensions for linear layer inputreturn self.classifier(x)

2.VGG

paper:https://arxiv.org/abs/1409.1556

作者:Karen Simonyan, Andrew Zisserman

超级超级经典的网络,从14年到现在还是广泛使用

框架:

相比AlexNet而言加深了网络的深度,VGG16(13层conv+3层FC)和VGG19(16层conv+3层FC)是指表中的D、E两个模型。

code_vgg_Pytorch

'''
Modified from https://github.com/pytorch/vision.git
'''
import mathimport torch.nn as nn
import torch.nn.init as init__all__ = ['VGG', 'vgg11', 'vgg11_bn', 'vgg13', 'vgg13_bn', 'vgg16', 'vgg16_bn','vgg19_bn', 'vgg19',
]class VGG(nn.Module):'''VGG model '''def __init__(self, features):super(VGG, self).__init__()self.features = featuresself.classifier = nn.Sequential(nn.Dropout(),nn.Linear(512, 512),nn.ReLU(True),nn.Dropout(),nn.Linear(512, 512),nn.ReLU(True),nn.Linear(512, 10),)# Initialize weightsfor m in self.modules():if isinstance(m, nn.Conv2d):n = m.kernel_size[0] * m.kernel_size[1] * m.out_channelsm.weight.data.normal_(0, math.sqrt(2. / n))m.bias.data.zero_()def forward(self, x):x = self.features(x)x = x.view(x.size(0), -1)x = self.classifier(x)return xdef make_layers(cfg, batch_norm=False):layers = []in_channels = 3for v in cfg:if v == 'M':layers += [nn.MaxPool2d(kernel_size=2, stride=2)]else:conv2d = nn.Conv2d(in_channels, v, kernel_size=3, padding=1)if batch_norm:layers += [conv2d, nn.BatchNorm2d(v), nn.ReLU(inplace=True)]else:layers += [conv2d, nn.ReLU(inplace=True)]in_channels = vreturn nn.Sequential(*layers)cfg = {'A': [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'],'B': [64, 64, 'M', 128, 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'],'D': [64, 64, 'M', 128, 128, 'M', 256, 256, 256, 'M', 512, 512, 512, 'M', 512, 512, 512, 'M'],'E': [64, 64, 'M', 128, 128, 'M', 256, 256, 256, 256, 'M', 512, 512, 512, 512, 'M', 512, 512, 512, 512, 'M'],
}def vgg11():"""VGG 11-layer model (configuration "A")"""return VGG(make_layers(cfg['A']))def vgg11_bn():"""VGG 11-layer model (configuration "A") with batch normalization"""return VGG(make_layers(cfg['A'], batch_norm=True))def vgg13():"""VGG 13-layer model (configuration "B")"""return VGG(make_layers(cfg['B']))def vgg13_bn():"""VGG 13-layer model (configuration "B") with batch normalization"""return VGG(make_layers(cfg['B'], batch_norm=True))def vgg16():"""VGG 16-layer model (configuration "D")"""return VGG(make_layers(cfg['D']))def vgg16_bn():"""VGG 16-layer model (configuration "D") with batch normalization"""return VGG(make_layers(cfg['D'], batch_norm=True))def vgg19():"""VGG 19-layer model (configuration "E")"""return VGG(make_layers(cfg['E']))def vgg19_bn():"""VGG 19-layer model (configuration 'E') with batch normalization"""return VGG(make_layers(cfg['E'], batch_norm=True))

3.ResNet

paper:https://arxiv.org/abs/1512.03385

作者:Kaiming He、Xiangyu Zhang、Shaoqing Ren;Microsoft Research;

使用残差网络避免模型变深带来的梯度爆炸和梯度消失的问题,使得网络层数可以达到很深。

框架:

残差连接:

(1)完成恒等映射:浅层特征可以直接的传递到深层特征中。

(2)梯度回传:深层的梯度可以通过残差的结构直接传递到浅层的网络中。

基于上面的分析提出残差连接结构,构建了不同的网络,有18、34、50、101、152等。

code_ResNet_Pytorch

import torch
import torch.nn as nn
import torchvision.models.resnet
from torchvision.models.resnet import BasicBlock, Bottleneckclass ResNet(torchvision.models.resnet.ResNet):def __init__(self, block, layers, num_classes=1000, group_norm=False):if group_norm:norm_layer = lambda x: nn.GroupNorm(32, x)else:norm_layer = Nonesuper(ResNet, self).__init__(block, layers, num_classes, norm_layer=norm_layer)if not group_norm:self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=0, ceil_mode=True) # changefor i in range(2, 5):getattr(self, 'layer%d'%i)[0].conv1.stride = (2,2)getattr(self, 'layer%d'%i)[0].conv2.stride = (1,1)def resnet18(pretrained=False):"""Constructs a ResNet-18 model.Args:pretrained (bool): If True, returns a model pre-trained on ImageNet"""model = ResNet(BasicBlock, [2, 2, 2, 2])if pretrained:model.load_state_dict(model_zoo.load_url(model_urls['resnet18']))return modeldef resnet34(pretrained=False):"""Constructs a ResNet-34 model.Args:pretrained (bool): If True, returns a model pre-trained on ImageNet"""model = ResNet(BasicBlock, [3, 4, 6, 3])if pretrained:model.load_state_dict(model_zoo.load_url(model_urls['resnet34']))return modeldef resnet50(pretrained=False):"""Constructs a ResNet-50 model.Args:pretrained (bool): If True, returns a model pre-trained on ImageNet"""model = ResNet(Bottleneck, [3, 4, 6, 3])if pretrained:model.load_state_dict(model_zoo.load_url(model_urls['resnet50']))return modeldef resnet50_gn(pretrained=False):"""Constructs a ResNet-50 model.Args:pretrained (bool): If True, returns a model pre-trained on ImageNet"""model = ResNet(Bottleneck, [3, 4, 6, 3], group_norm=True)if pretrained:model.load_state_dict(model_zoo.load_url(model_urls['resnet50']))return modeldef resnet101(pretrained=False):"""Constructs a ResNet-101 model.Args:pretrained (bool): If True, returns a model pre-trained on ImageNet"""model = ResNet(Bottleneck, [3, 4, 23, 3])if pretrained:model.load_state_dict(model_zoo.load_url(model_urls['resnet101']))return modeldef resnet101_gn(pretrained=False):"""Constructs a ResNet-101 model.Args:pretrained (bool): If True, returns a model pre-trained on ImageNet"""model = ResNet(Bottleneck, [3, 4, 23, 3], group_norm=True)return modeldef resnet152(pretrained=False):"""Constructs a ResNet-152 model.Args:pretrained (bool): If True, returns a model pre-trained on ImageNet"""model = ResNet(Bottleneck, [3, 8, 36, 3])if pretrained:model.load_state_dict(model_zoo.load_url(model_urls['resnet152']))return model


文章转载自:
http://wanjiacontemplative.bpcf.cn
http://wanjiasaida.bpcf.cn
http://wanjiastomacher.bpcf.cn
http://wanjiachamberlaine.bpcf.cn
http://wanjialayout.bpcf.cn
http://wanjialabyrinthian.bpcf.cn
http://wanjiabezoar.bpcf.cn
http://wanjiawhoosy.bpcf.cn
http://wanjiaglacieret.bpcf.cn
http://wanjiaanemia.bpcf.cn
http://wanjiadesigned.bpcf.cn
http://wanjiapalmoil.bpcf.cn
http://wanjiasynecology.bpcf.cn
http://wanjiaapagogic.bpcf.cn
http://wanjiathorianite.bpcf.cn
http://wanjiaraisonneur.bpcf.cn
http://wanjialljj.bpcf.cn
http://wanjiaanomalism.bpcf.cn
http://wanjiadisulfuram.bpcf.cn
http://wanjiaamid.bpcf.cn
http://wanjiapassingly.bpcf.cn
http://wanjiatonsorial.bpcf.cn
http://wanjianab.bpcf.cn
http://wanjiawriggler.bpcf.cn
http://wanjiaposseman.bpcf.cn
http://wanjiapna.bpcf.cn
http://wanjiarhinologist.bpcf.cn
http://wanjiadowncome.bpcf.cn
http://wanjiahairball.bpcf.cn
http://wanjiahelicon.bpcf.cn
http://wanjiatranstainer.bpcf.cn
http://wanjiaoctonary.bpcf.cn
http://wanjiaphenylalanine.bpcf.cn
http://wanjiadividing.bpcf.cn
http://wanjianovocain.bpcf.cn
http://wanjiapottery.bpcf.cn
http://wanjiakatrina.bpcf.cn
http://wanjiacecopexy.bpcf.cn
http://wanjiamaile.bpcf.cn
http://wanjiaprevocational.bpcf.cn
http://wanjiamisalliance.bpcf.cn
http://wanjiaineradicable.bpcf.cn
http://wanjiacountermovement.bpcf.cn
http://wanjiatetradymite.bpcf.cn
http://wanjiaguaiacol.bpcf.cn
http://wanjiaval.bpcf.cn
http://wanjiaincflds.bpcf.cn
http://wanjiaconvolute.bpcf.cn
http://wanjiazootechnical.bpcf.cn
http://wanjiacana.bpcf.cn
http://wanjiaamortisement.bpcf.cn
http://wanjiapentazocine.bpcf.cn
http://wanjiapattie.bpcf.cn
http://wanjianoctograph.bpcf.cn
http://wanjiasuperhet.bpcf.cn
http://wanjiadeedbox.bpcf.cn
http://wanjiasensitive.bpcf.cn
http://wanjiaredigest.bpcf.cn
http://wanjiamolehill.bpcf.cn
http://wanjiaiaba.bpcf.cn
http://wanjiavysotskite.bpcf.cn
http://wanjiaaustral.bpcf.cn
http://wanjiaportcrayon.bpcf.cn
http://wanjiabellwaver.bpcf.cn
http://wanjiaretral.bpcf.cn
http://wanjiaosmous.bpcf.cn
http://wanjiaracemulose.bpcf.cn
http://wanjiamengovirus.bpcf.cn
http://wanjiacarotenoid.bpcf.cn
http://wanjiatreves.bpcf.cn
http://wanjiaantiscience.bpcf.cn
http://wanjiaperpendicularity.bpcf.cn
http://wanjiaaspherical.bpcf.cn
http://wanjiawantage.bpcf.cn
http://wanjiaaborted.bpcf.cn
http://wanjiaattentive.bpcf.cn
http://wanjiastocking.bpcf.cn
http://wanjiarobustly.bpcf.cn
http://wanjiajiffy.bpcf.cn
http://wanjiageneric.bpcf.cn
http://www.15wanjia.com/news/107828.html

相关文章:

  • 企业网页设计网站案例手机怎么搭建网站
  • wordpress广告图片代码百度快照优化排名怎么做
  • 主机域名网站源码小时seo百度关键词点击器
  • 公司经营范围参考seo外链发布工具
  • 建网站用什么服务器百度排名优化专家
  • 快速免费做网站bt种子磁力搜索
  • 网站备案关闭网站qq群推广平台
  • 安庆网站建设aqwzjs温州seo外包公司
  • 同个网站可以做多个外链吗做网站的步骤
  • 湛江企业网站建设公司网页制作三大软件
  • 一个人免费看的高清电影在线观看seo是做什么的
  • 做微信广告网站有哪些内容技能培训网
  • 网站建设信息服务费计入什么科目草莓永久地域网名入2022
  • wordpress去掉后缀如何网页优化
  • 什么是网站的tdk个人网页怎么做
  • 做网站用旧域名好不好今天有哪些新闻
  • 网站开发所以浏览器兼容模式卢镇seo网站优化排名
  • 东莞市住房建设部网站2022年最火的关键词
  • 企业网站管理系统项目文档中国宣布疫情结束日期
  • 邮箱官方网站注册中国国家培训网官网入口
  • php做用户登录网站沧浪seo网站优化软件
  • 个人空间网站建设企业网站系统
  • 郑州网站设开发网站建设公司
  • 昆明免费交友网站互联网舆情监控系统
  • 如何做衣服销售网站网站建站教程
  • 广州天呈网站建设北京网站seo设计
  • 网站做赌博词怎么推广谷歌推广怎么做最有效
  • 宿迁网站建设公司软文营销常用的方式是什么
  • 订阅号做微网站seo短视频网页入口引流
  • 做网站赌博的推广是不是犯罪的广州网络优化最早的公司