Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image processing 如何在此输入和目标上使用permute?_Image Processing_Pytorch_Semantic Segmentation - Fatal编程技术网

Image processing 如何在此输入和目标上使用permute?

Image processing 如何在此输入和目标上使用permute?,image-processing,pytorch,semantic-segmentation,Image Processing,Pytorch,Semantic Segmentation,我在5个类+1(背景)的语义分段掩码上有错误 如何使用permute来避免这种情况 Target size (torch.Size([4, 1, 320, 480, 6])) must be the same as input size (torch.Size([4, 6, 320, 480])) 您可以组合排列和取消排序: 导入火炬 x=火炬的兰特((4,6,320480)) new_x=x.permute((0,2,3,1)).unsqueze(1) #新形状=火炬尺寸([4,132048

我在5个类+1(背景)的语义分段掩码上有错误

如何使用permute来避免这种情况

Target size (torch.Size([4, 1, 320, 480, 6])) must be the same as input size (torch.Size([4, 6, 320, 480]))

您可以组合
排列
取消排序

导入火炬
x=火炬的兰特((4,6,320480))
new_x=x.permute((0,2,3,1)).unsqueze(1)
#新形状=火炬尺寸([4,13204806])