未验证 提交 9d942c50 编写于 作者: G Guanghua Yu 提交者: GitHub

fix np.int warning in operator (#3344)

上级 18596b01
......@@ -1506,8 +1506,8 @@ class Cutmix(BaseOperator):
w = max(img1.shape[1], img2.shape[1])
cut_rat = np.sqrt(1. - factor)
cut_w = np.int(w * cut_rat)
cut_h = np.int(h * cut_rat)
cut_w = np.int32(w * cut_rat)
cut_h = np.int32(h * cut_rat)
# uniform
cx = np.random.randint(w)
......
......@@ -1343,8 +1343,8 @@ class CutmixImage(BaseOperator):
w = max(img1.shape[1], img2.shape[1])
cut_rat = np.sqrt(1. - factor)
cut_w = np.int(w * cut_rat)
cut_h = np.int(h * cut_rat)
cut_w = np.int32(w * cut_rat)
cut_h = np.int32(h * cut_rat)
# uniform
cx = np.random.randint(w)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册