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

4-D equivalent? #7

Open
zabzug-pfpt opened this issue Sep 21, 2020 · 3 comments
Open

4-D equivalent? #7

zabzug-pfpt opened this issue Sep 21, 2020 · 3 comments

Comments

@zabzug-pfpt
Copy link

What if I have a set of matrices instead of a set of vectors? Is it possible to extend the Set Transformer framework to cover that scenario?

I played around with it a little (including making some small tweaks) but got bogged down with the .bmm call in the MAB module:

RuntimeError: Expected 3-dimensional tensor, but got 4-dimensional tensor for argument #1 'batch1' (while checking arguments for bmm)
@juho-lee
Copy link
Owner

The current module does not support 4D matrix multiplication, so you have to first reshape the matrix into a vector and apply the set transformer modules.

@zhiqihuang
Copy link

What if I have a set of matrices instead of a set of vectors? Is it possible to extend the Set Transformer framework to cover that scenario?

I played around with it a little (including making some small tweaks) but got bogged down with the .bmm call in the MAB module:

RuntimeError: Expected 3-dimensional tensor, but got 4-dimensional tensor for argument #1 'batch1' (while checking arguments for bmm)

@zabzug-pfpt hi, are you able to extend set-transformer to 4-D input?

@zabzug-pfpt
Copy link
Author

I did not, I suspect that there is not an easy way of doing so. In my case, I decided to apply a convolutional layer + pooling over one dimension to reduce down from 4D to 3D, and then applied Set Transformer.

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