卷积
卷积,是CNN中最基础的组成部分,“卷积的本质是用卷积核的参数来提取数据的特征,通过矩阵的点乘运算与求和来得到结果。”(《深度学习之Pytorch物体检测实战》)
二维卷积动图演示具体操作
代码:
conv = nn.Conv2d(in_channels=1,out_channles=1,kernel_size =3,stride=1,padding=1,dilation=1,groups=1,bias=True)
参数:
in_channels:输入特征图的通道数
out_channles:输出特征图的通道数
kernel_size:卷积核的尺寸,通常有1、3、5、7
stride:卷积核在特征图上滑动的步长,一般为1
padding:填充,分为0填充和边缘填充,Pytorch默认0填充
dilation:空洞卷积,默认为1
groups:可实现组卷积,默认为1
bias:是否需要偏置,默认为True
计算量:in_channels * out_channels * kernel_size*k ...
EGE-UNet 论文阅读记录
摘要We incorporate a Group multi-axis Hadamard Product Attention module (GHPA)and a Group Aggregation Bridge module (GAB) in a lightweight manner. The GHPA groups input features and performs Hadamard Product Attention mechanism (HPA) on different axes to extract pathological information from diverse perspectives. The GAB effectively fuses multiscale information by grouping low-level features, high-level features, and a mask generated by the decoder at each stage.this is the first model with a para ...
H2former论文阅读记录
摘要Although methods based on convolutional neural networks (CNNs) have achieved good results, it is weak to model the long-range dependencies, which is very important forsegmentation task to build global context dependencies.The Transformers can establish long-range dependencies among pixels by self-attention, providing a supplement to the local convolution. In addition, multi-scale feature fusion and feature selection are crucial for medical image segmentation tasks, which is ignored by Transfor ...
Camoformer论文阅读记录
摘要we present a simple masked separable attention (MSA) for camouflaged object detection. We first separate the multi-head self-attention into three parts, which are responsible for distinguishing the camouflaged objects from the background using different mask strategies. Furthermore, we propose to capture high-resolution semantic representations progressively based on a simple top-down decoder with the proposed MSA to attain precise segmentation results. These structures plus a backbone encoder ...
PraNet论文阅读
摘要we propose a parallel reverse attention network (PraNet) for accurate polyp(息肉) segmentation in colonoscopy images. Specifically, we first aggregate the features in high-level layers using a parallel partial decoder (PPD). Based on the combined feature,we then generate a global map as the initial guidance area for the following components. In addition, we mine the boundary cues using the reverse attention (RA) module, which is able to establish the relationship between areas and boundary cues. ...
参数选择
1. 优化器(Optimizer)作用:优化器负责 根据损失函数的梯度来更新模型参数,目标是逐步减小损失值,使模型逼近最优解。
核心机制:
计算梯度:通过反向传播(Backpropagation)计算损失函数对模型参数的梯度。
参数更新:根据梯度方向和优化策略来调整参数。
常见优化器类型:
优化器
特点
适用场景
SGD
基础随机梯度下降,无动量,直接沿负梯度方向更新参数。
简单任务,需精细调参时。
SGD + Momentum
引入动量(惯性),累积历史梯度方向,加速收敛并减少震荡。
非凸优化、存在局部极小值的场景。
Adam
结合动量(一阶矩估计)和自适应学习率(二阶矩估计),自动调整学习率。
大多数深度学习任务,默认选择。
AdamW
在Adam基础上解耦权重衰减
大规模深度学习模型
RMSprop
自适应调整学习率,对梯度平方进行指数加权平均,缓解学习率消失问题。
RNN、非平稳目标函数场景。
Adagrad
为每个参数分配独立的学习率,适合稀疏数据,但学习率会单调下降至零。
自然语言处理、稀疏特征任务。
AdamW 和 Adam 的详细 ...