(self, dim_in, dim_out, patch_size)
| 10 | |
| 11 | class CogPatchify(torch.nn.Module): |
| 12 | def __init__(self, dim_in, dim_out, patch_size) -> None: |
| 13 | super().__init__() |
| 14 | self.proj = torch.nn.Conv3d(dim_in, dim_out, kernel_size=(1, patch_size, patch_size), stride=(1, patch_size, patch_size)) |
| 15 | |
| 16 | def forward(self, hidden_states): |
| 17 | hidden_states = self.proj(hidden_states) |