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

Fancy non-flat indexing #11

Closed
joschu opened this issue Aug 28, 2015 · 2 comments
Closed

Fancy non-flat indexing #11

joschu opened this issue Aug 28, 2015 · 2 comments

Comments

@joschu
Copy link
Owner

joschu commented Aug 28, 2015

Currently, you can do this:

x[0:2,:], x[0:2,1:3]

which uses GetSli, and this:

x[ cgt.arange(0,10), cgt.arange(0,20,2) ]

which uses GetFlatIndices op after computing the flat indices for the expression.

But you can't do this:

x[ [1,3], : ]

We should have an Op that looks like GetSli but takes an integer vector of indices along some axis, say, GetFancySli

@joschu joschu modified the milestone: 0.2 Sep 1, 2015
@lopuhin
Copy link

lopuhin commented Sep 5, 2015

Is it required to implement something like a lookup table commonly used in networks that learn word embeddings? Or there is some workaround?

@joschu
Copy link
Owner Author

joschu commented Sep 10, 2015

Implemented in a43259d

@joschu joschu closed this as completed Sep 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants