MCPcopy Create free account
hub / github.com/TimSeizinger/Bokehlicious / forward

Method forward

method/blocks.py:276–291  ·  view source on GitHub ↗

x: (b h w c)

(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

274 self.ffn_layernorm.reset_parameters()
275
276 def forward(self, x: torch.Tensor):
277 """
278 x: (b h w c)
279 """
280 x = self.fc1(x)
281 x = self.activation_fn(x)
282 x = self.activation_dropout_module(x)
283 if self.dwconv is not None:
284 residual = x
285 x = self.dwconv(x)
286 x = x + residual
287 if self.ffn_layernorm is not None:
288 x = self.ffn_layernorm(x)
289 x = self.fc2(x)
290 x = self.dropout_module(x)
291 return x

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected