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

Change the patch size #300

Open
MuneebMuhammad opened this issue Jul 26, 2022 · 1 comment
Open

Change the patch size #300

MuneebMuhammad opened this issue Jul 26, 2022 · 1 comment

Comments

@MuneebMuhammad
Copy link

I want the patch size to be (300x300), but I get this error: "RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 36 but got size 37 for tensor number 1 in the list."

@Unicorncosmos
Copy link

I want the patch size to be (300x300), but I get this error: "RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 36 but got size 37 for tensor number 1 in the list."

Check the Input Tensors:
Verify that all the tensors in the list have the same number of dimensions.
Check the sizes of the tensors along each dimension to identify any inconsistencies.
Verify Patch Extraction:
If you are extracting patches from an image or a larger tensor, ensure that the patch extraction process is correctly implemented.
Verify that the patch extraction algorithm is aligned with the desired patch size of (300x300).
Check if there are any off-by-one errors in the patch extraction code that might lead to the dimension mismatch.
Debug the Code:
Examine the code where the error occurs and inspect the relevant tensors.
Print out the sizes and shapes of the tensors involved to identify any inconsistencies.
Use debugging techniques like adding print statements or using a debugger to step through the code and track the size discrepancy.
Adjust Patch Extraction Parameters:
If you are using a patch extraction function or algorithm, check if there are any parameters or arguments that control the patch size.
Make sure these parameters are set to the desired size of (300x300).
By carefully reviewing the code and checking the tensor sizes at each step, you should be able to identify the source of the size mismatch error and adjust the code accordingly to set the patch size to (300x300).

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