未验证 提交 9a9670da 编写于 作者: W wangna11BD 提交者: GitHub

fix bug (#737)

* fix DLTP-61461

* fix install
上级 a7963dab
...@@ -218,7 +218,7 @@ def kernel_shift(kernel, sf): ...@@ -218,7 +218,7 @@ def kernel_shift(kernel, sf):
# Before applying the shift, we first pad the kernel so that nothing is lost due to the shift # Before applying the shift, we first pad the kernel so that nothing is lost due to the shift
# (biggest shift among dims + 1 for safety) # (biggest shift among dims + 1 for safety)
kernel = np.pad(kernel, np.int(np.ceil(np.max(shift_vec))) + 1, 'constant') kernel = np.pad(kernel, np.int_(np.ceil(np.max(shift_vec))) + 1, 'constant')
# Finally shift the kernel and return # Finally shift the kernel and return
return interpolation.shift(kernel, shift_vec) return interpolation.shift(kernel, shift_vec)
......
...@@ -59,7 +59,7 @@ def crop(image, center, scale, resolution=256.0): ...@@ -59,7 +59,7 @@ def crop(image, center, scale, resolution=256.0):
dtype=np.int32) dtype=np.int32)
newImg = np.zeros(newDim, dtype=np.uint8) newImg = np.zeros(newDim, dtype=np.uint8)
else: else:
newDim = np.array([br[1] - ul[1], br[0] - ul[0]], dtype=np.int) newDim = np.array([br[1] - ul[1], br[0] - ul[0]], dtype=np.int_)
newImg = np.zeros(newDim, dtype=np.uint8) newImg = np.zeros(newDim, dtype=np.uint8)
ht = image.shape[0] ht = image.shape[0]
wd = image.shape[1] wd = image.shape[1]
......
...@@ -240,8 +240,8 @@ class StarGANv2Mapping(nn.Layer): ...@@ -240,8 +240,8 @@ class StarGANv2Mapping(nn.Layer):
s = [] s = []
for i in range(idx.shape[0]): for i in range(idx.shape[0]):
s += [ s += [
out[idx[i].numpy().astype(np.int).tolist()[0], out[idx[i].numpy().astype(np.int_).tolist()[0],
y[i].numpy().astype(np.int).tolist()[0]] y[i].numpy().astype(np.int_).tolist()[0]]
] ]
s = paddle.stack(s) s = paddle.stack(s)
s = paddle.reshape(s, (s.shape[0], -1)) s = paddle.reshape(s, (s.shape[0], -1))
...@@ -286,8 +286,8 @@ class StarGANv2Style(nn.Layer): ...@@ -286,8 +286,8 @@ class StarGANv2Style(nn.Layer):
s = [] s = []
for i in range(idx.shape[0]): for i in range(idx.shape[0]):
s += [ s += [
out[idx[i].numpy().astype(np.int).tolist()[0], out[idx[i].numpy().astype(np.int_).tolist()[0],
y[i].numpy().astype(np.int).tolist()[0]] y[i].numpy().astype(np.int_).tolist()[0]]
] ]
s = paddle.stack(s) s = paddle.stack(s)
s = paddle.reshape(s, (s.shape[0], -1)) s = paddle.reshape(s, (s.shape[0], -1))
......
...@@ -2,11 +2,11 @@ tqdm ...@@ -2,11 +2,11 @@ tqdm
PyYAML>=5.1 PyYAML>=5.1
scikit-image>=0.14.0 scikit-image>=0.14.0
scipy>=1.1.0 scipy>=1.1.0
opencv-python <= 4.6.0 opencv-python==4.6.0.66
imageio==2.9.0 imageio==2.9.0
imageio-ffmpeg imageio-ffmpeg
librosa==0.8.1 librosa==0.8.1
numba==0.53.1 numba
easydict easydict
munch munch
natsort natsort
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册