Method
__init__
(self, patch_size=2, in_channels=4, embed_dim=768, bias=True)
Source from the content-addressed store, hash-verified
| 292 | """2D Image to Patch Embedding with support for Lumina-T2X""" |
| 293 | |
| 294 | def __init__(self, patch_size=2, in_channels=4, embed_dim=768, bias=True): |
| 295 | super().__init__() |
| 296 | self.patch_size = patch_size |
| 297 | self.proj = nn.Linear( |
| 298 | in_features=patch_size * patch_size * in_channels, |
| 299 | out_features=embed_dim, |
| 300 | bias=bias, |
| 301 | ) |
| 302 | |
| 303 | def forward(self, x, freqs_cis): |
| 304 | """ |
Callers
nothing calls this directly
Tested by
no test coverage detected