Skip to content

Commit bd566d8

Browse files
authored
Comments addressing PR #15 and Issue #65 (#75)
* Comments addressing PR #15 and Issue #65 * Link to PR #15
1 parent 8127013 commit bd566d8

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-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: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,14 @@ 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.
42+
# -- Thanks to @echosprint, original PR: https://github.com/facebookresearch/vjepa2/pull/15
4043
emb_sin = emb_sin.squeeze(-1).repeat(1, 1, 1, 2)
4144
emb_cos = emb_cos.squeeze(-1).repeat(1, 1, 1, 2)
45+
# emb_sin = emb_sin.repeat_interleave(2, dim=-1) # (..., N, D)
46+
# emb_cos = emb_cos.repeat_interleave(2, dim=-1) # (..., N, D)
4247

4348
# --
4449
y = x.unflatten(-1, (-1, 2))

0 commit comments

Comments
 (0)