chenlin
commited on
Commit
•
8f9c756
1
Parent(s):
a285f80
fix bug
Browse files- resampler.py +1 -1
resampler.py
CHANGED
@@ -44,7 +44,7 @@ def get_1d_sincos_pos_embed_from_grid(embed_dim, pos):
|
|
44 |
out: (M, D)
|
45 |
"""
|
46 |
assert embed_dim % 2 == 0
|
47 |
-
omega = np.arange(embed_dim // 2, dtype=np.
|
48 |
omega /= embed_dim / 2.
|
49 |
omega = 1. / 10000**omega # (D/2,)
|
50 |
|
|
|
44 |
out: (M, D)
|
45 |
"""
|
46 |
assert embed_dim % 2 == 0
|
47 |
+
omega = np.arange(embed_dim // 2, dtype=np.float32)
|
48 |
omega /= embed_dim / 2.
|
49 |
omega = 1. / 10000**omega # (D/2,)
|
50 |
|