摘要: paper class LinearSelfAttention(nn.Module): """ This layer applies a self-attention with linear complexity, as described in `https://arxiv.org/abs/220 阅读全文
posted @ 2024-11-15 19:58 iceeci 阅读(7) 评论(0) 推荐(0) 编辑
摘要: paper def my_self(x: torch.Tensor): ''' 通过这段代码 可以把每张图片图片中相对位置相同的若干个tokens放到最后两个维度 ''' # [B, C, H, W] -> [B, C, n_h, p_h, n_w, p_w] # n_h是高度方向上可以分多少个pa 阅读全文
posted @ 2024-11-15 19:27 iceeci 阅读(2) 评论(0) 推荐(0) 编辑