当前位置: 代码迷 >> 综合 >> RuntimeError: Sizes of tensors must match except in dimension 2. Got 5 and 4
  详细解决方案

RuntimeError: Sizes of tensors must match except in dimension 2. Got 5 and 4

热度:0   发布时间:2024-02-23 15:30:53.0

调试代码的时候,遇到***RuntimeError: Sizes of tensors must match except in dimension 2. Got 5 and 4*** 这个问题,
解决方式:
进行单步调试,发现,torch.cat(x,y) 这两个feature map 的大小不一致,可以采用上采样或者卷积,调整两个feature map大小

  相关解决方案