hub icon indicating copy to clipboard operation
hub copied to clipboard

Change the patch size

Open MuneebMuhammad opened this issue 1 year ago • 1 comments

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."

MuneebMuhammad avatar Jul 26 '22 08:07 MuneebMuhammad

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).

Unicorncosmos avatar Jun 23 '23 15:06 Unicorncosmos