Closed hendredlorentz closed 1 year ago
The square root is used here to find the height of the block in terms of patches while maintaining the desired number of patches in the block and the desired aspect ratio.
So basically we can calculate the number of patches in the block as follows: block_h (aspect_ratio block_h) = num_patches_block therefore to get block h we have to take a square root of num_patches_block/aspect ratio
tks!
Excuse me, may I know your email address? I have some questions regarding my own experimental part that I would like to discuss with you.
My email is gabrielasher2002@gmail.com. Feel free to ask any questions!
Okay, I have sent an email to your email address and I look forward to your help.
block_h = int(torch.sqrt(torch.tensor(num_patches_block / aspect_ratio)))
How should this code be understood? Why is the square root needed here and why is it divided by the aspect ratio?tks.