赞
踩
调用代码:这个依然比较占用gpu显存,可以在fpn里换,收敛能快点
Block(3, 40, 240, 80, hswish(), None, 2),
Block(3, 80, 200, 80, hswish(), None, 1),
Block(3, 80, 480, 112, hswish(), SeModule(112), 1),
Block(3, 112, 672, 112, hswish(), SeModule(112), 1),
Block(5, 112, 672, 160, hswish(), SeModule(160), 1),
Block(5, 160, 672, 160, hswish(), SeModule(160), 2),
Block(5, 160, 960, 160, hswish(), SeModule(160), 1),
- import torch
- import torch.nn as nn
-
- import torch.nn.functional as F
- import math
-
- # from tensorboardX import SummaryWriter
-
-
- class Hswish(nn.Module):
- def forward(self, x):
- out = x * F.relu6(x + 3, inplace=True) / 6
- return out
-
-
- class hsigmoid(nn.Module):
- def forward(self, x):
- out = F.relu6(x + 3, inplace=True) / 6
- return out
</
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。