Skip to content

Commit 68bc434

Browse files
committed
tensor_split -> chunk in apply_rot_embed_cat .. Fix #2594 coreml export
1 parent 1ec3915 commit 68bc434

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

timm/layers/pos_embed_sincos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def apply_rot_embed_cat(
273273
emb: torch.Tensor,
274274
half: bool = False
275275
) -> torch.Tensor:
276-
sin_emb, cos_emb = emb.tensor_split(2, -1)
276+
sin_emb, cos_emb = emb.chunk(2, -1)
277277
# x: [..., D], eg [x0, x1, x2, x3, x4, x5]
278278
if half:
279279
# sin: [..., D], eg [sin0, sin1, sin2, sin0, sin1, sin2]

0 commit comments

Comments
 (0)