fluid.layers.resize_bilinear得到的不是放大两倍的原图
Created by: cisco08
- 版本、环境信息: 1)PaddlePaddle版本:paddle1.6 2)CPU/GPU:CPU 3)系统环境:Mac OS 10.14 4)Python版本号 Python3.7 5)显存信息
- 复现信息:如为报错,请给出复现环境、复现步骤
- 问题描述: x = plt.imread("微信图片_20191207203405.jpg") with fluid.dygraph.guard(): xx = x.reshape((1,C,H,W)) d = fluid.dygraph.base.to_variable(xx.astype('float32')) H, W = d.shape[2:] H,W = H2,W2 upsample = fluid.layers.resize_bilinear(d, (H,W),align_corners=False) res=fluid.dygraph.base.to_variable(upsample)
res = np.squeeze(res.numpy())
res = res.reshape((res.shape[1],res.shape[2],res.shape[0])) plt.imshow(res.astype('uint8')) plt.show()