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

About input picture size #2

Closed
WXY-Belief opened this issue May 11, 2022 · 1 comment
Closed

About input picture size #2

WXY-Belief opened this issue May 11, 2022 · 1 comment

Comments

@WXY-Belief
Copy link

WXY-Belief commented May 11, 2022

line54:transforms.Resize(args.img_size)

This line of code will scaling the picture to 256 * 256.However, if I input a 296 * 294 picture, the following error will appear
"RuntimeError: Sizes of tensors must match except in dimension 2. Got 296 and 294 (The offending index is 0)"

after I manually scaled the picture to 256 * 256, the program can run correctly and output the results.

@StoryMY
Copy link
Owner

StoryMY commented May 12, 2022

Well, the code assumed that the "height:width" is "1:1". I have updated related preprocess in the new commit 86c6a95

@StoryMY StoryMY closed this as completed May 13, 2022
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