RuntimeError:stack expects each tensor to be equal size,but got [3,224,244] at entry 0 and [1,224,244] at entry 7

 

RuntimeError:stack expects each tensor to be equal size,but got [3,224,244] at entry 0 and [1,224,244] at entry 7

 

 报错原因:没有转换图片格式,不同的图片格式的颜色空间不同

参考:

RuntimeError:stack expects each tensor to be equal size,but got [3,224,244] at entry 0 and [1,224,244] at entry 7RuntimeError:stack expects each tensor to be equal size,but got [3,224,244] at entry 0 and [1,224,244] at entry 7

https://blog.csdn.net/missyougoon/article/details/85331493

RuntimeError:stack expects each tensor to be equal size,but got [3,224,244] at entry 0 and [1,224,244] at entry 7

上一篇:你还敢乱粘贴吗?


下一篇:[转]Howto: 使用ImageBrush替换PictureMarkerSymbol以加强graphic显示性能