Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

出现了形状不对等 #18

Open
hhhmmm123 opened this issue Dec 7, 2022 · 11 comments
Open

出现了形状不对等 #18

hhhmmm123 opened this issue Dec 7, 2022 · 11 comments

Comments

@hhhmmm123
Copy link

使用给出的代码跑了以后,出现了连接形状错误, ConcatOp : Dimensions of inputs should match: shape[0] = [1,366,490,64] vs. shape[1] = [1,365,490,64]

@hitzhangyu
Copy link
Owner

hitzhangyu commented Mar 13, 2023

size需要是4的倍数吧?

@Mornnn
Copy link

Mornnn commented Aug 30, 2023

我也出现了这个问题,请问解决了吗

@hitzhangyu
Copy link
Owner

图片尺寸裁剪为4的倍数

@Mornnn
Copy link

Mornnn commented Aug 30, 2023

图片尺寸裁剪为4的倍数

是把图片的宽和高的像素裁剪为4的倍数吗

@hitzhangyu
Copy link
Owner

嗯嗯,如果还是不对,就裁成8的倍数,这是下采样再上采样导致的问题

@Mornnn
Copy link

Mornnn commented Aug 30, 2023

嗯嗯,如果还是不对,就裁成8的倍数,这是下采样再上采样导致的问题

恩恩,我发现我把自己的图片裁剪后,会出现ValueError: Cannot feed value of shape (1, 520, 800, 4) for Tensor 'input_low:0', which has shape '(None, None, None, 3)'
的问题,请问是啥原因呀

@hitzhangyu
Copy link
Owner

图片多了一个通道。应该是你加载的这个图片除了RGB之外,还多了一个其它的

@Mornnn
Copy link

Mornnn commented Aug 30, 2023

图片多了一个通道。应该是你加载的这个图片除了RGB之外,还多了一个其它的

什么意思呀(呜呜呜俺是小白 别嫌俺笨)

@hitzhangyu
Copy link
Owner

删了那张测试图片,换一张? 或者只取矩阵 (1, 520, 800, 4) 第四个维度的前三个[:,:,:0:3]

@Mornnn
Copy link

Mornnn commented Aug 30, 2023

删了那张测试图片,换一张? 或者只取矩阵 (1, 520, 800, 4) 第四个维度的前三个[:,:,:0:3]

恩恩 可以了 我之前测试的那张是裁剪过的 我把原图放进去就可以了

@Mornnn
Copy link

Mornnn commented Aug 30, 2023

删了那张测试图片,换一张? 或者只取矩阵 (1, 520, 800, 4) 第四个维度的前三个[:,:,:0:3]

谢谢你!!!十分感谢!祝您心情愉快,一切顺利~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants