Skip to content

Commit 28262d3

Browse files
committed
Comments addressing PR #15 and Issue #65
1 parent b98e030 commit 28262d3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

configs/train/vitg16/droid-256px-8f.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ data:
1010
- left_mp4_path
1111
crop_size: 256
1212
datasets:
13-
- /your_file_path/droid_train_paths_cw.csv
13+
# CSV file, each line is a trajectory dir path
14+
# See https://github.com/facebookresearch/vjepa2/issues/65
15+
- /your_file_path/droid_train_paths.csv
1416
dataset_fpcs:
1517
- 8
1618
fps: 4

src/models/utils/modules.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,13 @@ def rotate_queries_or_keys(x, pos):
3636
# -- build rotation matrix and apply
3737
emb_sin = freq.sin() # (..., N, D/2)
3838
emb_cos = freq.cos() # (..., N, D/2)
39-
39+
# -- NOTE: This expansion has a subtle bug where frequencies are duplicated across the vector pair.
40+
# -- Fixing the bug would break compatibility with the pretrained model, but the fix can be applied by commenting
41+
# -- out the two lines below, and uncommenting the following two lines. (Thanks to @echosprint)
4042
emb_sin = emb_sin.squeeze(-1).repeat(1, 1, 1, 2)
4143
emb_cos = emb_cos.squeeze(-1).repeat(1, 1, 1, 2)
44+
# emb_sin = emb_sin.repeat_interleave(2, dim=-1) # (..., N, D)
45+
# emb_cos = emb_cos.repeat_interleave(2, dim=-1) # (..., N, D)
4246

4347
# --
4448
y = x.unflatten(-1, (-1, 2))

0 commit comments

Comments
 (0)