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

train error #2

Open
pheotry opened this issue Jun 15, 2023 · 2 comments
Open

train error #2

pheotry opened this issue Jun 15, 2023 · 2 comments

Comments

@pheotry
Copy link

pheotry commented Jun 15, 2023

How to deal with this problem.

File "d:\code\tao\torchrs\src\train.py", line 305, in
main(config)
File "d:\code\tao\torchrs\src\train.py", line 291, in main
train_and_get_best_model(misr_model, regis_model, optimizer, dataloaders, baseline_cpsnrs, config)
File "d:\code\tao\torchrs\src\train.py", line 175, in train_and_get_best_model
srs_shifted = apply_shifts(regis_model, srs, shifts, device)[:, 0]
File "d:\code\tao\torchrs\src\train.py", line 57, in apply_shifts
new_images = shiftNet.transform(thetas, images, device=device)
File "d:\code\tao\torchrs\src\DeepNetworks\ShiftNet.py", line 96, in transform
new_I = lanczos_shift(img=I.transpose(0, 1),
File "d:\code\tao\torchrs\src\DeepNetworks\lanczos.py", line 97, in lanczos_shift
I_s = torch.conv1d(I_padded,
RuntimeError: Expected 2D (unbatched) or 3D (batched) input to conv1d, but got input of size: [1, 1, 202, 202]

@mafizurrahman
Copy link

Hi, did you solve the problem?

@qqhe-frank
Copy link

I had the same problem, but the issue was only with the version of pytorch, I was previously using pytorch version 1.13. And using pytorch 1.10,python3.6 successfully eliminated the problem.

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