41b2ea1ff9
- 在 net.py 中引入 SMFA 组件 - 优化 BasicLayer 类的前向传播逻辑 - 添加 SMFA、DynamicFilter 和 UFFC 组件的实现 - 使用SMFA替代Pooling self.WTConv2d = WTConv2d(dim, dim) self.norm1 = LayerNorm(dim, 'WithBias') self.token_mixer = SMFA(dim=dim) # self.token_mixer = Pooling(kernel_size=pool_size) # vits是msa,MLPs是mlp,这个用pool来替代 self.norm2 = LayerNorm(dim, 'WithBias') mlp_hidden_dim = int(dim * mlp_ratio) self.poolmlp = PoolMlp(in_features=dim, hidden_features=mlp_hidden_dim, act_layer=act_layer, drop=drop)
1.7 MiB
1.7 MiB