(self, x)
| 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 | |
| 114 | class PatchEmbed(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected