Contents:
Visualize 2D positional embedding, possibly resized to a different grid size.
embed (Tensor) – embedding of shape [HW D]
Tensor
[HW D]
num_patches (Tuple[int, int]) – the H and W shapes of embed
Tuple
int
H
W
embed
target_patches (Optional[Tuple[int, int]]) – optionally, a target H and W
Optional
side_inch – height of one square in the resulting figure
Figure
A figure containing HxW heatmaps.
HxW