numpy ValueError: cannot reshape array of size 200704 into shape (1,3,224,224)

报错

ValueError: cannot reshape array of size 200704 into shape (1,3,224,224)

解决

如何将200704—2242244像素转变成2242243像素————png转jpg

file_path = 'work/216_cir_1_r95.png'
im = Image.open(file_path)                        
# 将一个4通道转化为rgb三通道
img = im.convert("RGB")
print('图像大小:',img.size)

你可能感兴趣的:(深度学习,python,深度学习)