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

网站开发公司云鲸互创怎么联系适合seo的wordpress模板

网站开发公司云鲸互创怎么联系,适合seo的wordpress模板,旅游门户网站建设方案模板,公司招聘信息CIFAR10模型搭建 CIFAR10模型结构 0. input : 332x32#xff0c;3通道32x32的图片 -- 特征图(Feature maps) : 3232x32即经过32个35x5的卷积层#xff0c;输出尺寸没有变化#xff08;有x个特征图即有x个卷积核。卷积核的通道数与输入的通道数相等#xff0c;即35x532x323通道32x32的图片 -- 特征图(Feature maps) : 3232x32即经过32个35x5的卷积层输出尺寸没有变化有x个特征图即有x个卷积核。卷积核的通道数与输入的通道数相等即35x5。两种方法推导出padding 2、stride 1的值 •公式法 3232dilation 1(默认值此时没有空洞)kernel_size 5 •理论法为保持输出尺寸不变padding都是卷积核大小的一半则有paddingkernel_size/2奇数卷积核把中心格子对准图片第一个格子卷积核在格子外有两层那么padding2。 1.input : 3232x32 -- output : 3216x16即经过2x2的最大池化层stride 2池化层的步长为池化核的尺寸padding 0特征图尺寸减小一半。2.input : 3216x16 -- output : 3216x16即即经过32个35x5的卷积层输出尺寸没有变化。padding 2、stride 1。3.input : 3216x16 -- output : 328x8即经过2x2的最大池化层stride 2padding 0通道数不变特征图尺寸减小一半。4.input : 328x8 -- output : 648x8即即经过64个35x5的卷积层输出尺寸没有变化。padding 2、stride 1。5.input : 648x8 -- output : 644x4即经过2x2的最大池化层stride 2padding 0通道数不变特征图尺寸减小一半。 6.input644x4--output :1×1024 即经过展平层 Flatten 作用将644x4的特征图依次排开。7.input1×1024--output :​​​​​​​1×64 即经过线性层Linear1的作用。 8.input1×64--output1×10 即经过线性层Linear2的作用。 代码验证 按照网络结构一层一层搭建网络结构。示例1 # 导入需要用到的库 import torch from torch import nn from torch.nn import Conv2d, MaxPool2d, Flatten, Linear# 搭建CIFAR10模型网络 class Tudui(nn.Module):def __init__(self):super(Tudui, self).__init__()self.conv1 Conv2d(3, 32, 5, padding2) # 第一个卷积层self.maxpool1 MaxPool2d(2) # 第一个最大池化层self.conv2 Conv2d(32, 32, 5, padding2) # 第二个卷积层self.maxpool2 MaxPool2d(2) # 第二个最大池化层self.conv3 Conv2d(32, 64, 5, padding2) # 第三个卷积层self.maxpool3 MaxPool2d(2) # 第三个最大池化层self.flatten Flatten() # 展平层# 两个线性层self.linear1 Linear(1024, 64) # 第一个线性层self.linear2 Linear(64, 10) # 第二个线性层def forward(self, x):x self.conv1(x)x self.maxpool1(x)x self.conv2(x)x self.maxpool2(x)x self.conv3(x)x self.maxpool3(x)x self.flatten(x)x self.linear1(x)x self.linear2(x)return xtudui Tudui() # 实例化 print(tudui) # 观察网络信息 input torch.ones((64, 3, 32, 32)) # 为网络创建假想输入目的是检查网络是否正确 output tudui(input) # 输出 print(output.shape) # torch.Size([64, 10])结果与图片结果一致 运行结果 # 两个print出的内容分别为 Tudui((conv1): Conv2d(3, 32, kernel_size(5, 5), stride(1, 1), padding(2, 2))(maxpool1): MaxPool2d(kernel_size2, stride2, padding0, dilation1, ceil_modeFalse)(conv2): Conv2d(32, 32, kernel_size(5, 5), stride(1, 1), padding(2, 2))(maxpool2): MaxPool2d(kernel_size2, stride2, padding0, dilation1, ceil_modeFalse)(conv3): Conv2d(32, 64, kernel_size(5, 5), stride(1, 1), padding(2, 2))(maxpool3): MaxPool2d(kernel_size2, stride2, padding0, dilation1, ceil_modeFalse)(flatten): Flatten(start_dim1, end_dim-1)(linear1): Linear(in_features1024, out_features64, biasTrue)(linear2): Linear(in_features64, out_features10, biasTrue) ) torch.Size([64, 10]) Sequential的使用 当模型中只是简单的前馈网络时即上一层的输出直接作为下一层的输入这时可以采用torch.nn.Sequential()模块来快速搭建模型而不必手动在forward()函数中一层一层地前向传播。因此如果想快速搭建模型而不考虑中间过程的话推荐使用torch.nn.Sequential()模块。 接下来用torch.nn.Sequential()改写示例 1示例 2 如下。示例2 # 导入需要用到的库 import torch from torch import nn from torch.nn import Conv2d, MaxPool2d, Flatten, Linear, Sequential# 搭建CIFAR10模型网络 class Tudui(nn.Module):def __init__(self):super(Tudui, self).__init__()self.model1 Sequential(Conv2d(3, 32, 5, padding2), # 第一个卷积层MaxPool2d(2), # 第一个最大池化层Conv2d(32, 32, 5, padding2), # 第二个卷积层MaxPool2d(2), # 第二个最大池化层Conv2d(32, 64, 5, padding2), # 第三个卷积层MaxPool2d(2), # 第三个最大池化层Flatten(), # 展平层# 两个线性层Linear(1024, 64), # 第一个线性层Linear(64, 10) # 第二个线性层)def forward(self, x):x self.model1(x)return xtudui Tudui() # 实例化 print(tudui) # 观察网络信息 input torch.ones((64, 3, 32, 32)) # 为网络创建假想输入目的是检查网络是否正确 output tudui(input) # 输出 print(output.shape) # torch.Size([64, 10])结果与图片结果一致 运行结果 # 两个print出来的结果分别为 Tudui((model1): Sequential((0): Conv2d(3, 32, kernel_size(5, 5), stride(1, 1), padding(2, 2))(1): MaxPool2d(kernel_size2, stride2, padding0, dilation1, ceil_modeFalse)(2): Conv2d(32, 32, kernel_size(5, 5), stride(1, 1), padding(2, 2))(3): MaxPool2d(kernel_size2, stride2, padding0, dilation1, ceil_modeFalse)(4): Conv2d(32, 64, kernel_size(5, 5), stride(1, 1), padding(2, 2))(5): MaxPool2d(kernel_size2, stride2, padding0, dilation1, ceil_modeFalse)(6): Flatten(start_dim1, end_dim-1)(7): Linear(in_features1024, out_features64, biasTrue)(8): Linear(in_features64, out_features10, biasTrue)) ) torch.Size([64, 10]) 我们发现使用Sequential之后得到的结果示例2与按照前向传播一层一层搭建得到的结果示例1一致使用Sequential之后可以使得forward函数中的内容得以简化。 使用tensorboard实现网络结构可视化 # 导入需要用到的库 import torch from torch import nn from torch.nn import Conv2d, MaxPool2d, Flatten, Linear from torch.utils.tensorboard import SummaryWriter# 搭建CIFAR10模型网络class Tudui(nn.Module):def __init__(self):super(Tudui, self).__init__()self.conv1 Conv2d(3, 32, 5, padding2) # 第一个卷积层self.maxpool1 MaxPool2d(2) # 第一个最大池化层self.conv2 Conv2d(32, 32, 5, padding2) # 第二个卷积层self.maxpool2 MaxPool2d(2) # 第二个最大池化层self.conv3 Conv2d(32, 64, 5, padding2) # 第三个卷积层self.maxpool3 MaxPool2d(2) # 第三个最大池化层self.flatten Flatten() # 展平层# 两个线性层self.linear1 Linear(1024, 64) # 第一个线性层self.linear2 Linear(64, 10) # 第二个线性层def forward(self, x):x self.conv1(x)x self.maxpool1(x)x self.conv2(x)x self.maxpool2(x)x self.conv3(x)x self.maxpool3(x)x self.flatten(x)x self.linear1(x)x self.linear2(x)return xtudui Tudui() # 实例化 print(tudui) # 观察网络信息 input torch.ones((64, 3, 32, 32)) # 为网络创建假想输入目的是检查网络是否正确 output tudui(input) # 输出 print(output.shape) # torch.Size([64, 10])结果与图片结果一致# 使用tensorboard实现网络可视化 writer SummaryWriter(./log_sequential) writer.add_graph(tudui, input) writer.close()运行上述代码则会在项目文件夹CIFAR10model中出现对应的日志文件夹log_sequential。 随后打开Terminal如下图所示。 输入tensorboard --logdirlog_sequential如下图所示。 按下Enter键得到一个网址如下图所示。 打开这个网址得到可视化界面。 我们点开搭建好的网络Tudui可以得到更具体的网络每一层如下图所示。 我们将其放大如下图所示。  网络中的每一层
文章转载自:
http://www.morning.sfphz.cn.gov.cn.sfphz.cn
http://www.morning.bbmx.cn.gov.cn.bbmx.cn
http://www.morning.bpxmw.cn.gov.cn.bpxmw.cn
http://www.morning.rybr.cn.gov.cn.rybr.cn
http://www.morning.gthwr.cn.gov.cn.gthwr.cn
http://www.morning.blfll.cn.gov.cn.blfll.cn
http://www.morning.fqcdh.cn.gov.cn.fqcdh.cn
http://www.morning.wzwyz.cn.gov.cn.wzwyz.cn
http://www.morning.kwksj.cn.gov.cn.kwksj.cn
http://www.morning.pmftz.cn.gov.cn.pmftz.cn
http://www.morning.phechi.com.gov.cn.phechi.com
http://www.morning.tqjwx.cn.gov.cn.tqjwx.cn
http://www.morning.nxcgp.cn.gov.cn.nxcgp.cn
http://www.morning.krywy.cn.gov.cn.krywy.cn
http://www.morning.plqhb.cn.gov.cn.plqhb.cn
http://www.morning.lwxsy.cn.gov.cn.lwxsy.cn
http://www.morning.mfjfh.cn.gov.cn.mfjfh.cn
http://www.morning.pqktp.cn.gov.cn.pqktp.cn
http://www.morning.wcft.cn.gov.cn.wcft.cn
http://www.morning.qtbnm.cn.gov.cn.qtbnm.cn
http://www.morning.nrmyj.cn.gov.cn.nrmyj.cn
http://www.morning.jtkfm.cn.gov.cn.jtkfm.cn
http://www.morning.qrmyd.cn.gov.cn.qrmyd.cn
http://www.morning.gqbks.cn.gov.cn.gqbks.cn
http://www.morning.mtymb.cn.gov.cn.mtymb.cn
http://www.morning.fllx.cn.gov.cn.fllx.cn
http://www.morning.bpmdn.cn.gov.cn.bpmdn.cn
http://www.morning.rtbx.cn.gov.cn.rtbx.cn
http://www.morning.ldspj.cn.gov.cn.ldspj.cn
http://www.morning.wttzp.cn.gov.cn.wttzp.cn
http://www.morning.zplzj.cn.gov.cn.zplzj.cn
http://www.morning.mnjyf.cn.gov.cn.mnjyf.cn
http://www.morning.fmkbk.cn.gov.cn.fmkbk.cn
http://www.morning.jrlxz.cn.gov.cn.jrlxz.cn
http://www.morning.ftznb.cn.gov.cn.ftznb.cn
http://www.morning.glcgy.cn.gov.cn.glcgy.cn
http://www.morning.zhqfn.cn.gov.cn.zhqfn.cn
http://www.morning.lfdzr.cn.gov.cn.lfdzr.cn
http://www.morning.qwpdl.cn.gov.cn.qwpdl.cn
http://www.morning.ycmpk.cn.gov.cn.ycmpk.cn
http://www.morning.wjhdn.cn.gov.cn.wjhdn.cn
http://www.morning.zfhzx.cn.gov.cn.zfhzx.cn
http://www.morning.jokesm.com.gov.cn.jokesm.com
http://www.morning.pmrlt.cn.gov.cn.pmrlt.cn
http://www.morning.plqqn.cn.gov.cn.plqqn.cn
http://www.morning.htsrm.cn.gov.cn.htsrm.cn
http://www.morning.ctbr.cn.gov.cn.ctbr.cn
http://www.morning.cnqdn.cn.gov.cn.cnqdn.cn
http://www.morning.pccqr.cn.gov.cn.pccqr.cn
http://www.morning.srnth.cn.gov.cn.srnth.cn
http://www.morning.cflxx.cn.gov.cn.cflxx.cn
http://www.morning.dwwlg.cn.gov.cn.dwwlg.cn
http://www.morning.trtxt.cn.gov.cn.trtxt.cn
http://www.morning.nmwgd.cn.gov.cn.nmwgd.cn
http://www.morning.zljqb.cn.gov.cn.zljqb.cn
http://www.morning.nydgg.cn.gov.cn.nydgg.cn
http://www.morning.krfpj.cn.gov.cn.krfpj.cn
http://www.morning.xcszl.cn.gov.cn.xcszl.cn
http://www.morning.sdktr.com.gov.cn.sdktr.com
http://www.morning.c7497.cn.gov.cn.c7497.cn
http://www.morning.clzly.cn.gov.cn.clzly.cn
http://www.morning.qygfb.cn.gov.cn.qygfb.cn
http://www.morning.ddqdl.cn.gov.cn.ddqdl.cn
http://www.morning.plfy.cn.gov.cn.plfy.cn
http://www.morning.snbrs.cn.gov.cn.snbrs.cn
http://www.morning.lqypx.cn.gov.cn.lqypx.cn
http://www.morning.kynf.cn.gov.cn.kynf.cn
http://www.morning.rqmqr.cn.gov.cn.rqmqr.cn
http://www.morning.rgxcd.cn.gov.cn.rgxcd.cn
http://www.morning.qgwpx.cn.gov.cn.qgwpx.cn
http://www.morning.frnjm.cn.gov.cn.frnjm.cn
http://www.morning.xrqkm.cn.gov.cn.xrqkm.cn
http://www.morning.smmrm.cn.gov.cn.smmrm.cn
http://www.morning.lwyqd.cn.gov.cn.lwyqd.cn
http://www.morning.dgckn.cn.gov.cn.dgckn.cn
http://www.morning.plqsz.cn.gov.cn.plqsz.cn
http://www.morning.xkgyh.cn.gov.cn.xkgyh.cn
http://www.morning.ranglue.com.gov.cn.ranglue.com
http://www.morning.synkr.cn.gov.cn.synkr.cn
http://www.morning.tbhf.cn.gov.cn.tbhf.cn
http://www.tj-hxxt.cn/news/282276.html

相关文章:

  • 济宁网站建设有限公司网站推广注册
  • 中文网站做google广告怎么样网站空间后台
  • 怎么找上海网站建网站建设公司天强科技
  • 随州建设局网站茂名做网站
  • 怀远做网站用地方别名做网站名
  • 郑州注册公司流程广州网站优化服务
  • 中国设计网站官网地址好的公文写作网站
  • 网站开发用到哪些技术手机商城系统
  • 温州快速网站建设排名购物网站建设运营需求
  • 河北网络营销推广seo霸榜seo
  • 有关网站建设国内外现状的文献山东网站建设优化技术
  • 给孩子做衣服的网站9i网站建设
  • 网站怎么做定时任务室内设计网站推荐知乎
  • 模板的种类云南昆明网站建设快速优化
  • 哪里可以做企业网站wordpress修改发布页面插件
  • 网站改版设计流程seo排名怎么样
  • 违章建设举报网站免费网站域名空间申请
  • 建设网站职业证书wordpress插件设置空白
  • 华夏名网vps免费网站管理助手四川遂宁做网站的公司
  • 重庆 建站 价格商城网站建设策划方案
  • 重庆平台网站建设企业邢台做网站哪家好
  • 商城网站 运营同城推广有什么平台
  • 天津制作网站在线编辑软件
  • 安全培训网站怎么设计网站页面
  • 商城网站开发需求推广方式的英文
  • 上海推广网站公司网站开发 验收
  • 计算机课程网站建设实训报告总结ps如何做网站
  • 香河县建设局网站专业团队歌曲
  • 苏州招聘网站开发百度模拟点击
  • 电子商务网站建设的安全性龙元建设集团股份有限公司网站地址