chongjie commited on
Commit
5c8ba70
1 Parent(s): 9f603d3

Update util/pos_embed.py

Browse files
Files changed (1) hide show
  1. util/pos_embed.py +1 -1
util/pos_embed.py CHANGED
@@ -53,7 +53,7 @@ def get_1d_sincos_pos_embed_from_grid(embed_dim, pos):
53
  out: (M, D)
54
  """
55
  assert embed_dim % 2 == 0
56
- omega = np.arange(embed_dim // 2, dtype=np.float)
57
  omega /= embed_dim / 2.
58
  omega = 1. / 10000**omega # (D/2,)
59
 
 
53
  out: (M, D)
54
  """
55
  assert embed_dim % 2 == 0
56
+ omega = np.arange(embed_dim // 2, dtype=np.float32)
57
  omega /= embed_dim / 2.
58
  omega = 1. / 10000**omega # (D/2,)
59