Skip to main content

Module conv2d_patch

Module conv2d_patch 

Source
Expand description

Patch embedder: strided Conv2D producing [N_patches, embed_dim].

Structs§

PatchEmbed
Patch embedder: converts a CHW image to a [N_patches, embed_dim] token sequence via a strided Conv2D with stride = kernel_size = patch_size.
PatchEmbedConfig
Configuration for the patch embedder.
PatchEmbedWeights
Learnable weights for the patch embedder.

Functions§

prepend_cls
Prepend the CLS token to a [n_patches, embed_dim] token sequence.