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

如何做企业网站营销怎么搭建属于自己的网站

如何做企业网站营销,怎么搭建属于自己的网站,网站模版源码,网站建设一般步骤是什么残差的模块的实现有两种方式, 一种使用两层相同 conv3x3 实现的,  即此时卷积核的大小是相同的; 另外一种方式, 两边使用conv1x1 实现, 中间使用 conv3x3, 这种也成为bottleNeck, 原文中提出了两种block&#x…

残差的模块的实现有两种方式,

一种使用两层相同 conv3x3 实现的,  即此时卷积核的大小是相同的;

另外一种方式, 两边使用conv1x1 实现, 中间使用 conv3x3, 这种也成为bottleNeck,

在这里插入图片描述

原文中提出了两种block,如上图,
左边的称作basic block,
右边的称为bottle neck。

结构都是在卷积层后面,添加一跳short cut,将输入与卷积层组的输出相加。

1. Basic block

注意观察结构,basic block中包含两个卷积层,卷积核数量相同,卷积核均为3x3;

1.1  代码实现:

def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1):"""3x3 convolution with padding"""return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,padding=dilation, groups=groups, bias=False, dilation=dilation)def conv1x1(in_planes, out_planes, stride=1):"""1x1 convolution"""return nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=stride, bias=False)class BasicBlock(nn.Module):expansion = 1def __init__(self, inplanes, planes, stride=1, downsample=None, groups=1,base_width=64, dilation=1, norm_layer=None):super(BasicBlock, self).__init__()if norm_layer is None:norm_layer = nn.BatchNorm2dif groups != 1 or base_width != 64:raise ValueError('BasicBlock only supports groups=1 and base_width=64')if dilation > 1:raise NotImplementedError("Dilation > 1 not supported in BasicBlock")# Both self.conv1 and self.downsample layers downsample the input when stride != 1self.conv1 = conv3x3(inplanes, planes, stride)self.bn1 = norm_layer(planes)self.relu = nn.ReLU(inplace=True)self.conv2 = conv3x3(planes, planes)self.bn2 = norm_layer(planes)self.downsample = downsampleself.stride = stridedef forward(self, x):identity = xout = self.conv1(x)out = self.bn1(out)out = self.relu(out)out = self.conv2(out)out = self.bn2(out)if self.downsample is not None:identity = self.downsample(x)out += identityout = self.relu(out)return out

2. BottleNeck

bottle neck的结构是前两组滤波核数量相同,第三层滤波核数量是前两组的4倍,第二层尺寸3x3,其余两层尺寸是1x1。

2.1 代码实现:

class Bottleneck(nn.Module):# Bottleneck in torchvision places the stride for downsampling at 3x3 convolution(self.conv2)# while original implementation places the stride at the first 1x1 convolution(self.conv1)# according to "Deep residual learning for image recognition"https://arxiv.org/abs/1512.03385.# This variant is also known as ResNet V1.5 and improves accuracy according to# https://ngc.nvidia.com/catalog/model-scripts/nvidia:resnet_50_v1_5_for_pytorch.expansion = 4def __init__(self, inplanes, planes, stride=1, downsample=None, groups=1,base_width=64, dilation=1, norm_layer=None):super(Bottleneck, self).__init__()if norm_layer is None:norm_layer = nn.BatchNorm2dwidth = int(planes * (base_width / 64.)) * groups# Both self.conv2 and self.downsample layers downsample the input when stride != 1self.conv1 = conv1x1(inplanes, width)self.bn1 = norm_layer(width)self.conv2 = conv3x3(width, width, stride, groups, dilation)self.bn2 = norm_layer(width)self.conv3 = conv1x1(width, planes * self.expansion)self.bn3 = norm_layer(planes * self.expansion)self.relu = nn.ReLU(inplace=True)self.downsample = downsampleself.stride = stridedef forward(self, x):identity = xout = self.conv1(x)out = self.bn1(out)out = self.relu(out)out = self.conv2(out)out = self.bn2(out)out = self.relu(out)out = self.conv3(out)out = self.bn3(out)if self.downsample is not None:identity = self.downsample(x)out += identityout = self.relu(out)return out
http://www.lbrq.cn/news/2550619.html

相关文章:

  • flashfxp连接wordpress太原seo网站优化
  • 修改wordpress入口地址网络推广优化平台
  • 图片制作gif国外网站谷歌seo推广
  • 访问国外网站太慢全球最大的中文搜索引擎
  • 网站建设合同服务事项百度入口网址
  • 建设网站需要什么资料优化网站链接的方法
  • 申请免费网站公司互联网推广方式
  • 网站关键词优化怎么做it学校培训学校哪个好
  • 做网站 要学 什么语言爱站网站长工具
  • 做网站的市场前景网络互联网推广
  • 镇江个人网站建设2345系统导航
  • 网站域名一年多少钱镇江网站建设方案
  • 北京黑马培训机构怎么样网站优化排名易下拉系统
  • cms 做网站模板seo l
  • 安徽网站开发培训价格淘宝如何刷关键词增加权重
  • 网站导航为什么用ul列表做关键词排名点击软件
  • c做网站教程baidu百度首页官网
  • 做视频网站的挣钱吗萧山seo
  • 自适应 WordPress 主题seo快速排名软件平台
  • 网站没有流量个人引流推广怎么做
  • wordpress生成静态 mip网站做优化好还是推广好
  • 双鸭山网站建设企业郑州今天刚刚发生的新闻
  • 网站建设流程步骤上海网站快速优化排名
  • wordpress在百度排名靠前seo经验是什么
  • 北京企业网站搭建油烟机seo关键词
  • 天津市建设 中标公示网站东莞疫情最新通知
  • 网站建设设计技术方案模板下载如何推销产品给客户
  • 织梦美女图片网站模板站长工具永久
  • 制作企业网站页面多少钱seo是指
  • 提供购物网站建设新闻发布最新新闻
  • 应用药品注册证识别技术,为医药行业的合规、高效与创新发展提供核心驱动力
  • 向华为学习——IPD流程体系之IPD术语
  • Java Matcher对象中find()与matches()的区别
  • Spark的宽窄依赖
  • 深入剖析 Spark Shuffle 机制:从原理到实战优化
  • Java面试宝典:MySQL8新特性底层原理