zjut
|
41b2ea1ff9
|
feat(net): 为 net.py 添加新的组件引用并优化前向传播逻辑
- 在 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)
|
2024-11-05 14:09:59 +08:00 |
|