cyto_dl.nn.vits.blocks.patchify.patchify module#
- class cyto_dl.nn.vits.blocks.patchify.patchify.Patchify(patch_size: List[int], emb_dim: int, n_patches: List[int], spatial_dims: int = 3, context_pixels: List[int] = [0, 0, 0], input_channels: int = 1, tasks: List[str] | None = [], learnable_pos_embedding: bool = True)[source]#
Bases:
PatchifyBase
Class for converting images to a masked sequence of patches with positional embeddings.
- property img2token#