ServiceNow / embedding-propagation

Codebase for Embedding Propagation: Smoother Manifold for Few-Shot Classification. This is a ServiceNow Research project that was started at Element AI.
Apache License 2.0
208 stars 21 forks source link

Some codes in 'global_consistency' seems wrong #13

Closed LinglanZhao closed 3 years ago

LinglanZhao commented 3 years ago

Hi! Thanks for your transparent work! I find some codes in https://github.com/ElementAI/embedding-propagation/blob/master/embedding_propagation/embedding_propagation.py#L96 seems wrong because the size of tensor mismatchs at non-singleton dimension. This implementation is also contrary to that in https://github.com/ElementAI/embedding-propagation/blob/e7bfc719ac39af027456d0404bffccb52db681dc/src/models/base_ssl/distances.py#L587. @prlz77 @IssamLaradji

LinglanZhao commented 3 years ago

Maybe https://github.com/ElementAI/embedding-propagation/blob/master/embedding_propagation/embedding_propagation.py#L85 weights: Tensor of shape (batch, n, n) should be weights: Tensor of shape (n, n)?

prlz77 commented 3 years ago

Your are right, the documentation is wrong. It receives a tensor of size (n,n). I have accordingly fixed it. Thanks for pointing it out!