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

个人主页自助建站wordpress开启2级域名

个人主页自助建站,wordpress开启2级域名,网站怎么对接微信支付宝,建设银行关方网站1.v8本身的模块存放在nn文件夹下。 2.在nn文件夹下新建一个ASPP.py文件,将新添加的模块写入其中。 3.把下面这段代码复制进去 import torch import torch.nn as nn import numpy as np import torch.nn.functional as F# without BN version class ASPP(nn.Module)…

1.v8本身的模块存放在nn文件夹下。

2.在nn文件夹下新建一个ASPP.py文件,将新添加的模块写入其中。

3.把下面这段代码复制进去


import torch
import torch.nn as nn
import numpy as np
import torch.nn.functional as F# without BN version
class ASPP(nn.Module):def __init__(self, in_channel=512, out_channel=256):super(ASPP, self).__init__()self.mean = nn.AdaptiveAvgPool2d((1, 1))  # (1,1)means ouput_dimself.conv = nn.Conv2d(in_channel,out_channel, 1, 1)self.atrous_block1 = nn.Conv2d(in_channel, out_channel, 1, 1)self.atrous_block6 = nn.Conv2d(in_channel, out_channel, 3, 1, padding=6, dilation=6)self.atrous_block12 = nn.Conv2d(in_channel, out_channel, 3, 1, padding=12, dilation=12)self.atrous_block18 = nn.Conv2d(in_channel, out_channel, 3, 1, padding=18, dilation=18)self.conv_1x1_output = nn.Conv2d(out_channel * 5, out_channel, 1, 1)def forward(self, x):size = x.shape[2:]image_features = self.mean(x)image_features = self.conv(image_features)image_features = F.upsample(image_features, size=size, mode='bilinear')atrous_block1 = self.atrous_block1(x)atrous_block6 = self.atrous_block6(x)atrous_block12 = self.atrous_block12(x)atrous_block18 = self.atrous_block18(x)net = self.conv_1x1_output(torch.cat([image_features, atrous_block1, atrous_block6,atrous_block12, atrous_block18], dim=1))return net

import torch
import torch.nn.functional as F
import torch.nn as nnclass ASPP(nn.Module):def __init__(self, in_channel=512, out_channel=256):super(ASPP, self).__init__()self.mean = nn.AdaptiveAvgPool2d((1, 1))  # (1,1)means ouput_dimself.conv = nn.Conv2d(in_channel, out_channel, 1, 1)self.atrous_block1 = nn.Conv2d(in_channel, out_channel, 1, 1)self.atrous_block6 = nn.Conv2d(in_channel, out_channel, 3, 1, padding=6, dilation=6)self.atrous_block12 = nn.Conv2d(in_channel, out_channel, 3, 1, padding=12, dilation=12)self.atrous_block18 = nn.Conv2d(in_channel, out_channel, 3, 1, padding=18, dilation=18)self.conv_1x1_output = nn.Conv2d(out_channel * 5, out_channel, 1, 1)def forward(self, x):size = x.shape[2:]image_features = self.mean(x)image_features = self.conv(image_features)image_features = F.upsample(image_features, size=size, mode='bilinear')atrous_block1 = self.atrous_block1(x)atrous_block6 = self.atrous_block6(x)atrous_block12 = self.atrous_block12(x)atrous_block18 = self.atrous_block18(x)net = self.conv_1x1_output(torch.cat([image_features, atrous_block1, atrous_block6,atrous_block12, atrous_block18], dim=1))return netif __name__ == '__main__':x = torch.randn(1, 256, 16, 16)model = ASPP(256, 256)print(model(x).shape)

SPPFCSPC模块使用以下代码 

import torch
import torch.nn.functional as F
import torch.nn as nn####### SPPFCSPC #####
class SPPFCSPC(nn.Module):def __init__(self, c1, c2, n=1, shortcut=False, g=1, e=0.5, k=5):super(SPPFCSPC, self).__init__()c_ = int(2 * c2 * e)  # hidden channelsself.cv1 = Conv(c1, c_, 1, 1)self.cv2 = Conv(c1, c_, 1, 1)self.cv3 = Conv(c_, c_, 3, 1)self.cv4 = Conv(c_, c_, 1, 1)self.m = nn.MaxPool2d(kernel_size=k, stride=1, padding=k // 2)self.cv5 = Conv(4 * c_, c_, 1, 1)self.cv6 = Conv(c_, c_, 3, 1)self.cv7 = Conv(2 * c_, c2, 1, 1)def forward(self, x):x1 = self.cv4(self.cv3(self.cv1(x)))x2 = self.m(x1)x3 = self.m(x2)y1 = self.cv6(self.cv5(torch.cat((x1, x2, x3, self.m(x3)), 1)))y2 = self.cv2(x)return self.cv7(torch.cat((y1, y2), dim=1))####### end of SPPFCSPC #####if __name__ == '__main__':x = torch.randn(1, 256, 16, 16)model = SPPFCSPC(256, 256)print(model(x).shape)

4.引入配置好的模块环境。

5.复制一份yolov8.yaml文件,修改模型参数

6. yolov8-ASPP.yaml文件

6.修改配置代码

http://www.dtcms.com/wzjs/800835.html

相关文章:

  • 网站可以查出在哪里做的吗企业展示网站案例
  • 网站开发的框架协议南昌市会做网站有哪几家
  • 如何获取网站根目录链接wordpress 转小程序
  • 网站推广平台有哪些网络营销产品策略案例
  • 专业做电脑系统下载网站好怎么修改网站上传附件大小
  • wordpress 头部导航番禺推广优化
  • html网站登录界面模板wordpress上传视频大小
  • php做教育网站武陟做网站
  • 做网站怎么回本成都专业网站制作多少钱
  • 水泵行业网站怎么做中职校园网站建设建议
  • linux系统做网站有什么平台可以发布推广信息
  • 德阳网站建设网站建设个人网页设计的主要内容和要求
  • 网站过度优化的表现php能干嘛 wordpress
  • 雄安网站建设传媒网站模板
  • 旅游英文网站 建设需求最近国内网站网站做的最好的是哪个
  • 网站上的产品板块wordpress 区块编辑器
  • 东莞推广网站排名标志设计说明案例
  • 河北康城建设集团网站wordpress 时间不对
  • 网站首页的模块布局jsp网站开发中英文页面切换
  • 公司概况-环保公司网站模板哪个建设网站好
  • 做网站需要哪些流程企业云平台管理系统
  • 为什么做电子商务网站的原因网站的规划与建设课程设计
  • 手机论坛网站源码潍坊娜娜网站制作
  • 重庆网站建设seo优化网页qq登陆首页
  • 哈尔滨网站建设网站制作成都百度推广公司联系电话
  • 怎么做创意短视频网站wordpress地址和站点地址区别
  • Dell网站建设建议化州网站建设
  • 宁夏考试教育网站网站建设教程这篇苏州久远网络
  • 莆田建站培训上海网站开发平台
  • wordpress门户网站主题设计公司展厅设计