MCPcopy Create free account
hub / github.com/geekcomputers/Python / forward

Method forward

ML/src/python/neuralforge/nn/attention.py:92–98  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

90 self.activation = nn.GELU()
91
92 def forward(self, x):
93 x = self.fc1(x)
94 x = self.activation(x)
95 x = self.dropout(x)
96 x = self.fc2(x)
97 x = self.dropout(x)
98 return x
99
100class TransformerBlock(nn.Module):
101 def __init__(self, embed_dim, num_heads, mlp_ratio=4.0, dropout=0.1, drop_path=0.0):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected