↓ 2 callersFunctionpermute_and_flattenPermute and then flatten a tensor, from size (N, A, C, H, W) to (N, H * W * A, C). Args: layer (Tensor): Tensor of shape (N, C, H
mmdet/models/utils/vlfuse_helper.py:34
↓ 2 callersMethodwindow_partition Args: x: (B, H, W, C) Returns: windows: (num_windows*B, window_size, window_size, C)
mmdet/models/backbones/swin.py:273
↓ 2 callersFunctionxy_dense_knn_matrixGet KNN based on the pairwise distance. Args: x: (batch_size, num_dims, num_points, 1) y: (batch_size, num_dims, num_points, 1)
mmpretrain/models/backbones/vig.py:102
↓ 2 callersMethodxyxy_to_cxcywhConvert box coordinates from (x1, y1, x2, y2) to (cx, cy, w, h). Args: boxes (Tensor): xyxy boxes tensor with shape of (..., 4).
mmdet/structures/bbox/horizontal_boxes.py:76