asrafulashiq / transfer_broad

Pytorch Code for "A Broad Study on the Transferability of Visual Representations with Contrastive Learning" (ICCV 2021)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to get CKA scores between different stages in Figure 4?

klfsalfjl opened this issue · comments

Thanks for your amazing study!
I have some questions about the CKA scores shown in Figure 4. Take ResNet-50 as an example, which has five stages.

  1. Does stage 5 include the average pooling layer to output the feature of size 1x2048?
  2. Given an input sample, for the feature after each in-between stage (1-4), do you flatten the original feature map (1 x c x h x w) to a vector (1 x chw) OR do you adopt an extra average pooling process to obtain a vector (1 x c)? I've tried to flatten the feature map after each stage but obtained a very high-dimension vector (about 1M).

(c: feature dimension; h: height; w: width)
Looking forward to your reply, thanks.