mmpretrain.models.utils.resize_relative_position_bias_table¶ mmpretrain.models.utils.resize_relative_position_bias_table(src_shape, dst_shape, table, num_head)[source]¶ Resize relative position bias table. Parameters: src_shape (int) – The resolution of downsampled origin training image, in format (H, W). dst_shape (int) – The resolution of downsampled new training image, in format (H, W). table (tensor) – The relative position bias of the pretrained model. num_head (int) – Number of attention heads. Returns: The resized relative position bias table. Return type: torch.Tensor