语义分割自己收集的一些tricks

https://www.bilibili.com/video/BV11E411y7Dr/?spm_id_from=333.788.videocard.12

ResNeSt: Split-Attention Networks(ResNet改进版本)
(1)大的min batch,使用cosine学习率衰减策略。warm up。BN层参数设置。
(2)标签平滑
(3)自动增强
(4)mixup训练
(5)大的切割设置
(6)正则化

Bisenet
https://github.com/CoinCheung/BiSeNet
These are the tricks that I find might be useful:
use online hard example mining loss. This let the model be trained more efficiently.
do not add weight decay when bn parameters and bias parameters of nn.Conv2d or nn.Linear are tuned.
use a 10 times larger lr at the model output layers.
use crop evaluation. We do not want the eval scale to be too far away from the train scale, so we crop the chips from the images to do evaluation and then combine the results to make the final prediction.
multi-scale training and multi-scale-flip evaluating. On each scale, the scores of the original image and its flipped version are summed up, and then the exponential of the sum is computed to be the prediction of this scale.
warmup of 1000 iters to make sure the model better initialized.

torch-cv
# Zero-initialize the last BN in each residual branch,
# so that the residual branch starts with zeros, and each residual block behaves like an identity.
# This improves the model by 0.2~0.3% according to https://arxiv.org/abs/1706.02677
if zero_init_residual:
    for m in self.modules():
        if isinstance(m, Bottleneck):
            nn.init.constant_(m.bn3.weight, 0)
        elif isinstance(m, BasicBlock):
            nn.init.constant_(m.bn2.weight, 0)

图像分类常使用的trick:https://mp.weixin.qq.com/s?__biz=MzU2NTc5MjIwOA==&mid=2247497397&idx=2&sn=54a27c6c60637b280d0c2442db8fb0df&chksm=fcb4ea0acbc3631ca7277505585478f1fc1c342fcbfebc33dd5ad9ce13f335eeec33f61be6ce&scene=126&sessionid=1600855122&key=461d0d4ae0561348c3fd7bcc195eb51d6f250dbeaf26aaedf745a8a001895b7d555f9be8ba988c1e8fedcbac3e774b35f583cb28633d88ce18f17002b3f554806dc08d23352ffc7a3474f29857bd4f87655eb7c70e0e5fab25d3f0baab77bdd67f15c9fac6d782cd83e6a34e6033da6c64091182ed0f39f9835e7b559c594ca2&ascene=1&uin=MjM3NDE0MTk3NA%3D%3D&devicetype=Windows+10&version=62080079&lang=zh_CN&exportkey=ARMcy9aXVRc0tpxWJHLVnMU%3D&pass_ticket=M9diu1GtzxssCtMaW3vXAOgAzUKchtQ3CFSN97Hxr4vRbV3jeKM2QEUVK%2Fyr1XCr&wx_header=0

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
深度学习tricks是指在深度学习模型训练过程中使用的一些技巧和策略,旨在提高模型的性能和训练效果。以下是一些常用的深度学习tricks: 1. 数据增强(Data Augmentation):通过对原始数据进行随机变换和扩充,生成更多的训练样本,以增加模型的泛化能力。 2. 批归一化(Batch Normalization):在每个小批量数据上进行归一化操作,有助于加速模型的收敛速度,提高模型的稳定性和泛化能力。 3. 学习率调整(Learning Rate Schedule):根据训练的进程动态地调整学习率,例如使用学习率衰减或者学习率预热等策略,以提高模型的收敛性能。 4. 正则化(Regularization):通过添加正则化项,如L1正则化或L2正则化,限制模型的复杂度,防止过拟合。 5. 提前停止(Early Stopping):在训练过程中监控验证集上的性能指标,当性能不再提升时停止训练,以避免过拟合。 6. 参数初始化(Parameter Initialization):合适的参数初始化可以帮助模型更快地收敛和更好地泛化,常用的初始化方法包括Xavier初始化和He初始化等。 7. 梯度裁剪(Gradient Clipping):限制梯度的范围,防止梯度爆炸或梯度消失问题,提高模型的稳定性。 8. 集成学习(Ensemble Learning):通过结合多个模型的预测结果,可以提高模型的泛化能力和鲁棒性。 9. 迁移学习(Transfer Learning):利用已经训练好的模型在新任务上进行微调,可以加快模型的训练速度和提高模型的性能。 10. 深度网络结构设计:合理设计网络结构,包括层数、宽度、卷积核大小等,可以提高模型的表达能力和学习能力。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值