| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
| return t.tensor | ||
|
|
||
|
|
||
| class TensorFlowCompBackend(AbstractNumpyBasedBackend[TensorFlowTensor]): |
There was a problem hiding this comment.
general comment about the class, to me it looks good I like that we rely on tnp as much as we can.
Maybe norm_left, norm_right should be named differenlty
norm_left could be : cast_output
norm_right could be: get_tensor
this will make the code clearer
maybe @JohannesMessner as a better idea for the name.
Sorry, something went wrong.
There was a problem hiding this comment.
I added few comments
Sorry, something went wrong.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
| try: | ||
| import tensorflow as tf # type: ignore | ||
|
|
||
| from docarray.typing import TensorFlowTensor |
There was a problem hiding this comment.
for torch i moved this thing to a helper in utils, so this check only has to be done once globally. Can we do the same for tf?
Sorry, something went wrong.
There was a problem hiding this comment.
yes, saw that and started doing this in the TF embedding/video/audio PR, so i'll do this refactor there if that's fine with you @JohannesMessner
Sorry, something went wrong.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
| return inputs | ||
| ``` | ||
|
|
||
| Much nicer, don't you think? One main difference to using DocArray with PyTorch, is that when using TensorFlowTensor's, you have to access it's `.tensor` attribute directly, as it can be seen in `.forward_podcast()` above. This is due to the fact that while `TorchTensor` is a subclass of `torch.Tensor`, `TensorFlowTensor` is not a subclass of `tf.Tensor` but instead stores a `tf.Tensor` in its `.tensor` attribute. |
There was a problem hiding this comment.
It may be good to explain why this is the case?
Sorry, something went wrong.
There was a problem hiding this comment.
Why is this different?
Sorry, something went wrong.
There was a problem hiding this comment.
Why is this different?
@anna-charlotte you can probably add due to a technical limitation on tf.Tensor
Sorry, something went wrong.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
| schema definition (see below). Everything handles in a pythonic manner by relying on type hints. | ||
|
|
||
|
|
||
| ## Coming from TensorFlow |
There was a problem hiding this comment.
this part is too big IMO. We just need to show that there is a (tiny ?) difference and that you need to access tensor.tensor. No need to show the full example
Sorry, something went wrong.
| return inputs | ||
| ``` | ||
|
|
||
| Much nicer, don't you think? One main difference to using DocArray with PyTorch, is that when using TensorFlowTensor's, you have to access it's `.tensor` attribute directly, as it can be seen in `.forward_podcast()` above. This is due to the fact that while `TorchTensor` is a subclass of `torch.Tensor`, `TensorFlowTensor` is not a subclass of `tf.Tensor` but instead stores a `tf.Tensor` in its `.tensor` attribute. |
There was a problem hiding this comment.
Why is this different?
@anna-charlotte you can probably add due to a technical limitation on tf.Tensor
Sorry, something went wrong.
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Sorry, something went wrong.
|
📝 Docs are deployed on https://ft-feat-tensorflow-support--jina-docs.netlify.app 🎉 |
Sorry, something went wrong.
|
📝 Docs are deployed on https://ft-feat-tensorflow-support--jina-docs.netlify.app 🎉 |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Signed-off-by: anna-charlotte charlotte.gerhaher@jina.ai
Goals:
Add Tensorflow support to v2: