MCPcopy Create free account
hub / github.com/OpenBMB/VisRAG / resample_patch_embed

Function resample_patch_embed

timm_modified/timm/layers/patch_embed.py:139–210  ·  view source on GitHub ↗

Resample the weights of the patch embedding kernel to target resolution. We resample the patch embedding kernel by approximately inverting the effect of patch resizing. Code based on: https://github.com/google-research/big_vision/blob/b00544b81f8694488d5f36295aeb7972f3755ffe/big_v

(
        patch_embed,
        new_size: List[int],
        interpolation: str = 'bicubic',
        antialias: bool = True,
        verbose: bool = False,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 6

checkpoint_filter_fnFunction · 0.90
checkpoint_filter_fnFunction · 0.90
checkpoint_filter_fnFunction · 0.90
_load_weightsFunction · 0.90
checkpoint_filter_fnFunction · 0.90

Calls 2

get_resize_matFunction · 0.85
toMethod · 0.80

Tested by

no test coverage detected