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

Method forward

method/blocks.py:220–246  ·  view source on GitHub ↗
(self, source: Tensor, pos_map: Tensor = None)

Source from the content-addressed store, hash-verified

218 self.depth = depth
219
220 def forward(self, source: Tensor, pos_map: Tensor = None) -> Tensor:
221 x = source
222
223 x = self.norm1(x)
224
225 x = self.cat(x, pos_map)
226 x = self.conv1(x)
227 x = self.activation(x)
228
229 att = self.attention(x)
230
231 x = x * att
232 x = self.conv2(x)
233
234 x = self.dropout1(x)
235
236 y = source + x * self.beta
237
238 x = self.conv3(self.norm2(y))
239 x = self.activation(x)
240 x = self.conv4(x)
241
242 x = self.dropout2(x)
243
244 ret = y + x * self.gamma
245
246 return ret
247
248class FeedForwardNetwork(nn.Module):
249 def __init__(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected