feat: allow variable tensor dimension#1007
Conversation
abd14a0 to
5468d0b
Compare
|
Do we want to add an example usage in the docstrings? |
JohannesMessner
left a comment
There was a problem hiding this comment.
Can this logic be move into the AbstractTensor class so that it "just works" when adding a new tensor type? Also I'm guessing variables ('x') are not shared between tensors (or the same Document), right?
Yes please! |
First question, unfortunately not. Numpy and torch have slightly different api, particularly in this case, in the |
samsja
left a comment
There was a problem hiding this comment.
would be nice to find a way to factorize the code between torch and numpy
cannot we abstract the reshaping part, somewhere in the computational backend ? |
I suggest the same |
Signed-off-by: Jackmin801 <[email protected]>
Signed-off-by: Jackmin801 <[email protected]>
Signed-off-by: Jackmin801 <[email protected]>
Signed-off-by: Jackmin801 <[email protected]>
Signed-off-by: Jackmin801 <[email protected]>
Signed-off-by: Jackmin801 <[email protected]>
Signed-off-by: Jackmin801 <[email protected]>
Signed-off-by: Jackmin801 <[email protected]>
Signed-off-by: Jackmin801 <[email protected]>
Signed-off-by: Jackmin801 <[email protected]>
01119e5 to
6f89780
Compare
Signed-off-by: Jackmin801 <[email protected]>
Signed-off-by: Jackmin801 <[email protected]>
Signed-off-by: Jackmin801 <[email protected]>
Signed-off-by: Jackmin801 <[email protected]>
b07cc2f to
5c87da1
Compare
Signed-off-by: Jackmin801 <[email protected]>
Signed-off-by: Jackmin801 <[email protected]>
| """ | ||
| ... | ||
|
|
||
| @overload |
There was a problem hiding this comment.
Would be nice to automatically generate the overload. But lets not do it in this PR unless you found a brillant solution haha
There was a problem hiding this comment.
I dont think it works :( python/mypy#11488
There was a problem hiding this comment.
but we could generate the code though
There was a problem hiding this comment.
nah not code generation via our friend the bot.
But we could have a helper function that generate 3 methods with the correct overload
There was a problem hiding this comment.
could it be done via decorator somehow?
Signed-off-by: Jackmin801 <[email protected]>
7ab4d2e to
ecdf48a
Compare
|
📝 Docs are deployed on https://ft-feat-871-tensor-vardim--jina-docs.netlify.app 🎉 |
Goals: