1.分块patch partition
use a patch size of
4
×
4 and thus the feature dimension of eachn patch is
4
×
4
×
3 = 48
在这里设置了4
× 4× 3的块的大小,原始图像被 分成维度为4
×
4
×
3 = 48的小块。
2.线性编码linear embedding
A linear embedding layer is applied on this raw-valued feature to project it to an arbitrary dimension (denoted as

该博客介绍了如何使用PyTorch实现图像到块嵌入的过程,首先通过4x4的块大小将图像分块,然后应用线性编码(2d卷积)将每个块映射到任意维度,最后进行特征的拉平和维度交换,以准备输入到后续的神经网络模型中。
最低0.47元/天 解锁文章
8424

被折叠的 条评论
为什么被折叠?



