MCPcopy Create free account
hub / github.com/Tang1705/Baidu-Rot-Validate / forward

Method forward

VisionTransformer.py:115–127  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

113 self.mlp = MlpBlock(in_dim, mlp_dim, in_dim, dropout_rate)
114
115 def forward(self, x):
116 residual = x
117 out = self.norm1(x)
118 out = self.attn(out)
119 if self.dropout:
120 out = self.dropout(out)
121 out += residual
122 residual = out
123
124 out = self.norm2(out)
125 out = self.mlp(out)
126 out += residual
127 return out
128
129
130class Encoder(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected