You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The relations that exist so far all calculate square matrices Rel(x_i, x_j) with x_i and x_j in X. For negative edge sampling, a batch consists of row (row) and column (col) indices, so only Rel(x_row[i], y_col[i]) for i from 0 to len(row) - 1 must be calculated. For a single item, len(row) = neg_sampling_rate + 1. I don't want to calculate the full matrix and subsample, as this is inefficient.
The text was updated successfully, but these errors were encountered:
A quick solution would be to implement DistsFromTo, whose compute_relations method takes a tensor of shape (2, n, dim) and returns a list of n distances in the form of a new RelationData subclass (e.g., RelationTensor and/or RelationArray) without any conversion methods.
If this is the only relation that works with negative edge sampling, is there a way to set it by default so it doesn't have to be specified? What about the sub methods that should be implemented for all other relations?
The relations that exist so far all calculate square matrices
Rel(x_i, x_j)
withx_i
andx_j
inX
. For negative edge sampling, a batch consists of row (row
) and column (col
) indices, so onlyRel(x_row[i], y_col[i])
fori
from0
tolen(row) - 1
must be calculated. For a single item,len(row) = neg_sampling_rate + 1
. I don't want to calculate the full matrix and subsample, as this is inefficient.The text was updated successfully, but these errors were encountered: