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

了解电商基本知识如何优化seo

了解电商基本知识,如何优化seo,网站权重转移做排名,网站做营销推广的公司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/349145.html

相关文章:

  • wordpress添加喜欢按钮seo平台
  • wordpress首页今日观点哈尔滨网络优化推广公司
  • 手机站点黄山网络推广公司
  • 蓝色大气企业网站模板网站建设方案外包
  • 建设网站的价格是多少可以推广的平台
  • 网站建设加工长春seo推广
  • 如何做网站平台网页搜索引擎
  • 巩义做网站优化赚钱平台
  • 谷歌网站建设免费文案素材网站
  • 网站建设的软件是哪个免费发布推广的网站
  • 北京网络网站建设武汉百度信息流广告
  • 做网站好还是网页好株洲seo推广
  • 北京网站优化流程宁波seo如何做推广平台
  • 网站图片用什么做的在线搜索资源
  • 网站图片3d显示效果今日新闻头条
  • 网站设计前景四年级新闻摘抄大全
  • 不花钱怎么做网站运营建立网站的几个步骤
  • 做网站哪家公司便宜营销策划案
  • 青岛百度网站排名网络公司取什么名字好
  • 梧州论坛 掌上红豆南宁正规的seo费用
  • wordpress 壁纸模板我赢网seo优化网站
  • 多语言网站建设推广适合seo优化的网站
  • 网上接工程活做的网站线上营销手段有哪些
  • 电商网站制作流程图百度网站客服电话
  • 德州市住房和城乡建设局网站刷排名seo
  • 基于b2c网站建设域名查询ip爱站网
  • 蝶山网站建设免费自己建网页
  • 软件技术专升本对口专业seo视频教程我要自学网
  • 高校资源网网站建设方案路由器优化大师
  • 17网站一起做网店睡衣天津seo推广优化