Skip to content

Clarification on continuous_index Handling Multi-Variable Inputs in CEBRA #198

Answered by stes
Barbod1380 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Barbod1380 , by default, all continuous features are processed together, this is done due to how distance are calculated here

def __call__(self, query, mask=None):
"""Compute the pairwise distances between index and query.
Args:
query: (n, d)
The query matrix
mask: (N,)
A binary mask with same length as the index
Returns: (M,n)
Pairwise distances between the m samples with True binary
mask (default: N) and the given query samples.
"""
# TODO(stes): slow
query = query.to(self.device)
qTq = query.square().sum(1, keepdim=True).T

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Barbod1380
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants