You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello Javier,
I'm trying to understand your WHD forward function, but fail to understand the dimension of normalized_y.
# One by oneprob_map_b=prob_map[b, :, :]
gt_b=gt[b]
orig_size_b=orig_sizes[b, :]
norm_factor= (orig_size_b/self.resized_size).unsqueeze(0)
# Pairwise distances between all possible locations and the GTed locationsn_gt_pts=gt_b.size()[0]
normalized_x=norm_factor.repeat(self.n_pixels, 1) *self.all_img_locationsnormalized_y=norm_factor.repeat(len(gt_b), 1) *gt_bd_matrix=cdist(normalized_x, normalized_y)
From my understanding, gt_b.size() = [H, W], normal_factor.size = (1, 2), then n_gt_pts = H; self.all_img_locations.size() = [HxW, 2] which leads to normalized_x.size() = [HxW, 2] ;
Then, here comes my puzzle. norm_factor.repeat(len(gt_b), 1) gives me [B, 2], but gt_b.size() = [H, W], how to multiply these 2 tensors?? Did you use some special reshape operations here?
Thank you!
The text was updated successfully, but these errors were encountered:
Hello Javier,
I'm trying to understand your WHD forward function, but fail to understand the dimension of
normalized_y
.From my understanding,
gt_b.size() = [H, W]
,normal_factor.size = (1, 2)
, thenn_gt_pts = H
;self.all_img_locations.size() = [HxW, 2]
which leads tonormalized_x.size() = [HxW, 2]
;Then, here comes my puzzle.
norm_factor.repeat(len(gt_b), 1)
gives me[B, 2]
, butgt_b.size() = [H, W]
, how to multiply these 2 tensors?? Did you use some special reshape operations here?Thank you!
The text was updated successfully, but these errors were encountered: