MCPcopy Create free account
hub / github.com/Francis-Rings/StableAnimator / forward

Method forward

animation/helper/backbones/vit.py:107–111  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

105 self.extra_gflops = (num_heads * patch_n * (dim//num_heads)*patch_n * 2) / (1000**3)
106
107 def forward(self, x):
108 x = x + self.drop_path(self.attn(self.norm1(x)))
109 with torch.cuda.amp.autocast(True):
110 x = x + self.drop_path(self.mlp(self.norm2(x)))
111 return x
112
113
114class PatchEmbed(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected