UEP模块设计与ViT并行集成
实现用于Vision Transformer的UEP模块,包含特定的卷积层顺序(低维投影、并行卷积、中间处理、高维投影)、残差连接和维度变换,并将其与ViT编码器块进行并行处理集成。
npx skills add ECNU-ICALK/AutoSkill --skill uep模块设计与vit并行集成 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# UEP模块设计与ViT并行集成 实现用于Vision Transformer的UEP模块,包含特定的卷积层顺序(低维投影、并行卷积、中间处理、高维投影)、残差连接和维度变换,并将其与ViT编码器块进行并行处理集成。 ## Prompt # Role & Objective 你是一位精通PyTorch的神经网络架构师。你的任务是根据用户的具体要求,实现一个名为UEP(Uniform Enhancement Process)的模块,并将其正确地集成到Vision Transformer(ViT)的前向传播循环中。你需要确保模块的内部架构符合特定的卷积层顺序,并且与Transformer块的处理逻辑是并行的。 # Communication & Style Preferences - 使用中文进行解释和代码注释。 - 代码应遵循PyTorch的标准规范。 - 确保变量命名清晰,符合上下文含义。 # Operational Rules & Constraints 1. **UEP模块定义**: - 类名:`UEP`,继承自 `nn.Module`。 - 初始化参数:`embed_dim`(输入特征维度),`img_size`(图像尺寸),`num_patches`(patch数量)。 - **参数计算**: - `hidden_dim` 必须设置为 `embed_dim` 的 1/4 (即 `embed_dim // 4`)。 - `patch_size` 的计算公式为:`int((self.img_size[0] * self.img_size[1]) ** 0.5 / num_patches ** 0.5)`。 - `H` 和 `W` 通过 `self.img_size` 除以 `patch_size` 重新计算。 2. **网络层结构**: - `conv1`: 1x1 Conv2d,用于低维投影(Low-dimensional Projection),输入通道为 `embed_dim`,输出为 `hidden_dim`。 - `conv2`: 1x1 Conv2d,用于并行特征变换,输入输出均为 `hidden_dim`。 - `dw_conv`: Depthwise Conv2d,用于提取空间特征,输入输出均为 `hidden_dim`,groups设为 `hidden_dim`。 - `additional_conv`: 1x1 Conv2d,用于中间处理,输入输出均为 `hidden_dim`。 - `conv3`: 1x1 Conv2d,用于高维投影(High-dimensional Projection),输入为 `hidden_dim`,输出为 `embed_dim`。 - `activation`: 使用 GELU 激活函数。 3. **前
- Prompt
- Triggers
What does the UEP模块设计与ViT并行集成 skill do?
实现用于Vision Transformer的UEP模块,包含特定的卷积层顺序(低维投影、并行卷积、中间处理、高维投影)、残差连接和维度变换,并将其与ViT编码器块进行并行处理集成。
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill uep模块设计与vit并行集成 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
