numpy 图像通道转换[n c h w] 转 [n h w c]
numpy 图像通道转换[n c h w] 转 [n h w c]
img = np.transpose(img, (0, 2, 3, 1))
img_hwc = np.transpose(img_chw, (1, 2, 0))
image = np.expand_dims(image, axis=0)
img = np.transpose(img, (0, 2, 3, 1))
img_hwc = np.transpose(img_chw, (1, 2, 0))
image = np.expand_dims(image, axis=0)