chenlin commited on
Commit
8f9c756
1 Parent(s): a285f80
Files changed (1) hide show
  1. 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.float)
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