MCPcopy Create free account
hub / github.com/buaacxf/VIPTR / forward

Method forward

modules/VIPTRv1.py:297–312  ·  view source on GitHub ↗

x: (b h w c)

(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

295 self.ffn_layernorm.reset_parameters()
296
297 def forward(self, x: torch.Tensor):
298 '''
299 x: (b h w c)
300 '''
301 x = self.fc1(x)
302 x = self.activation_fn(x)
303 x = self.activation_dropout_module(x)
304 if self.dwconv is not None:
305 residual = x
306 x = self.dwconv(x)
307 x = x + residual
308 if self.ffn_layernorm is not None:
309 x = self.ffn_layernorm(x)
310 x = self.fc2(x)
311 x = self.dropout_module(x)
312 return x
313
314
315class FeedForward(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected