未验证 提交 97e9e75b 编写于 作者: G Guanghua Yu 提交者: GitHub

fix transform resize type to float32 (#5802)

上级 cf2c96ac
......@@ -824,7 +824,7 @@ class Resize(BaseOperator):
im_scale_x = resize_w / im_shape[1]
im = self.apply_image(sample['image'], [im_scale_x, im_scale_y])
sample['image'] = im
sample['image'] = im.astype(np.float32)
sample['im_shape'] = np.asarray([resize_h, resize_w], dtype=np.float32)
if 'scale_factor' in sample:
scale_factor = sample['scale_factor']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册