Skip to content

number of dims don't match in permute #25

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

Open
RobertXiaobinW opened this issue May 8, 2021 · 1 comment
Open

number of dims don't match in permute #25

RobertXiaobinW opened this issue May 8, 2021 · 1 comment

Comments

@RobertXiaobinW
Copy link

RobertXiaobinW commented May 8, 2021

楼主楼主
报错如下:
90 x = self.cnn(x) # [B,512,W/16,1]
91 x = torch.squeeze(x, 3) # [B,512,W]
---> 92 x = x.permute([0, 2, 1]) # [B,W,512]
93 x, h1 = self.rnn1(x)
94 x, h2 = self.rnn2(x, h1)

RuntimeError: number of dims don't match in permute

是因为我前面CTPN程序里的图片裁得太细了吗?换了张大点的图片可以呢

图片尺寸:(2581, 276, 3)
(2580, 283, 3)
(2545, 257, 3)
(2058, 321, 3)

@yizt
Copy link
Owner

yizt commented May 8, 2021

@RobertXiaobinW 您好,可以在91行打印出x的维度,看看是什么问题

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

2 participants