Open BlueDruddigon opened 1 year ago
In Swin Transformer V2, as proposed using Log-Space CPB,
In the code implementation, log-spaced coordinates are generated when transferring across window sizes through relative_coords_table like in this code snippet.
relative_coords_table
https://github.com/microsoft/Swin-Transformer/blob/f92123a0035930d89cf53fcb8257199481c4428d/models/swin_transformer_v2.py#L109-L111
I have two questions:
8
np.log2(8)
In Swin Transformer V2, as proposed using Log-Space CPB,
In the code implementation, log-spaced coordinates are generated when transferring across window sizes through
relative_coords_table
like in this code snippet.https://github.com/microsoft/Swin-Transformer/blob/f92123a0035930d89cf53fcb8257199481c4428d/models/swin_transformer_v2.py#L109-L111
I have two questions:
8
andnp.log2(8)
? Why do you do that ?relative_coords_table
by 8 and remove the afterwards divided bynp.log2(8)
, what has changed?