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

[REQ] Index arithmetics #231

Open
yhtang opened this issue Mar 28, 2022 · 0 comments
Open

[REQ] Index arithmetics #231

yhtang opened this issue Mar 28, 2022 · 0 comments
Labels

Comments

@yhtang
Copy link
Owner

yhtang commented Mar 28, 2022

Is your feature request related to a problem? Please describe.
The FunFact tensor expression syntax lacks a way to express convolutions and tensor reshaping in a convenient manner.

Describe the solution you'd like
We could use index addition to denote convolution, e.g.

A[i+p, j+q] B[p, q]  #convolving A with B using B as a filter.

Following a similar line of thought, index multiplication can denote both reshaping and Kronecker product (since Kronecker product can be thought of as outer product + reshaping):

A[i] B[j] >> [i*j]  # Kronecker product between A and B
A[i, j, k] >> [i*j, k]  #reshape two first dimensions of A to a vector

Describe alternatives you've considered
Currently, we have the unary * operator to denote Kronecker product, e.g.:

A[[*i]] B[[*i]]  # Kronecker product between A

but we do not have the means to express reshaping or convolution yet.

Additional context
#216.

@yhtang yhtang added the feature label Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant