(self, x)
| 91 | self.mlp_2 = Mlp(in_features=dim, hidden_features=channels_dim, act_layer=act_layer, drop=drop) |
| 92 | |
| 93 | def forward(self, x): |
| 94 | ## Spatial Graph MLP |
| 95 | x = rearrange(x, f'b j c -> b c j') |
| 96 | res = x |
| 97 | x = self.norm1(x) |
| 98 | |
| 99 | x_gcn_1 = rearrange(x, 'b c j-> b c 1 j') |
| 100 | x_gcn_1 = self.gcn_1(x_gcn_1) |
| 101 | x_gcn_1 = rearrange(x_gcn_1, 'b c 1 j -> b c j') |
| 102 | |
| 103 | x = res + self.drop_path(self.mlp_1(x) + x_gcn_1) |
| 104 | |
| 105 | ## Channel Graph MLP |
| 106 | x = rearrange(x, f'b c j -> b j c') |
| 107 | res = x |
| 108 | x = self.norm2(x) |
| 109 | |
| 110 | x_gcn_2 = rearrange(x, 'b j c-> b c 1 j') |
| 111 | x_gcn_2 = self.gcn_2(x_gcn_2) |
| 112 | x_gcn_2 = rearrange(x_gcn_2, 'b c 1 j -> b j c') |
| 113 | |
| 114 | x = res + self.drop_path(self.mlp_2(x) + x_gcn_2) |
| 115 | |
| 116 | return x |
| 117 | |
| 118 | |
| 119 | class Mlp_gcn(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected