docs: clarify pos_embed parameter intent in HieraBackbone

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
cmoyates 2026-03-01 05:55:01 -03:30
parent cc2d31b435
commit ac4393fcb4
No known key found for this signature in database
GPG Key ID: F65E08480FDC22D2

View File

@ -388,7 +388,8 @@ class HieraBackbone(nn.Module):
# Patch embedding
self.patch_embed = HieraPatchEmbed()
# Positional embedding (loaded from checkpoint, interpolated at load time)
# Positional embedding — placeholder overwritten by load_checkpoint().
# Declared as mx.array so load_weights() can assign it; frozen via .eval().
self.pos_embed = mx.zeros((1, _prod(self.tokens_spatial_shape), EMBED_DIM))
# Build all 24 blocks