Sha-Lab / FEAT

The code repository for "Few-Shot Learning via Embedding Adaptation with Set-to-Set Functions"
MIT License
418 stars 84 forks source link

Question about proto #71

Closed LoveMiki closed 2 years ago

LoveMiki commented 2 years ago

Hi

I noticed that in line 99: proto = support.mean(dim=1) of feat.py file, you calculate the mean of the first dimension. However, I think the shape of support is (batch_size, way, shot, d). Shouldn't it be averaged over the second dimension?

Thank you

Han-Jia commented 2 years ago

Hi, the first dimension is dim = 0.

For dim = 1, we average the shot dimension since the shape of the support is (batch size, shot, way, channel)