Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to understand the softagg for frame aggregation? #20

Open
ZuoJiaxing opened this issue Jan 18, 2023 · 4 comments
Open

How to understand the softagg for frame aggregation? #20

ZuoJiaxing opened this issue Jan 18, 2023 · 4 comments

Comments

@ZuoJiaxing
Copy link

Hi, I've a problem understanding the index of edges when you perform the softagg for the frame aggregation:
net = net + self.agg_ij(net, ii*12345 + jj)

net = net + self.agg_ij(net, ii*12345 + jj)

In the paper, it is said that frame aggregation is performed on the edges sharing the same source and destination frames. How can it be "ii*12345 + jj"? It will be appreciated if you can explain it a little bit.

@lahavlipson
Copy link
Collaborator

The SoftAgg block aggregates edges with the same value in the second argument. "ii*12345 + jj" is the same for all edges with the same source and destination frames.

@senecobis
Copy link

Possibly a follow-up question.
I was trying to understand the same softagg.
I see that ii and jj are arrays with the same number inside e.g. ii=[0,0,0,...] and jj=[1,1,1,...] therefore is understandable that "ii*12345 + jj" has always the same value. What I didn’t get is why it is multiplied for a smilingly random number 12345.

@lahavlipson
Copy link
Collaborator

ii*12345 + jj simply maps a pair of integers, i and j, to single unique integer. The value of this number doesn't matter, torch.hash(ii, jj) would work just as well if such a function existed. See https://pytorch-scatter.readthedocs.io/en/1.4.0/composite/softmax.html#torch_scatter.composite.scatter_softmax

@senecobis
Copy link

senecobis commented Apr 29, 2023

It's clear thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants