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

Will it support for SparseTensor (Tensorflow or Pytorch)? #15

Open
EdisonLeeeee opened this issue Aug 13, 2020 · 1 comment
Open

Will it support for SparseTensor (Tensorflow or Pytorch)? #15

EdisonLeeeee opened this issue Aug 13, 2020 · 1 comment

Comments

@EdisonLeeeee
Copy link

Hi, jonasrauber

Thanks for your works!

I wonder if it will add support for SparseTensor (Tensorflow or Pytorch), like this:

import numpy as np
import tensorflow as tf
import eagerpy as ep

x = np.array([[0, 1, 0],
              [0, 0, 1],
              [1, 0, 1]])

# Tensorflow SparseTensor
sp_x = tf.sparse.from_dense(x)

# eagerpy
# is it implemented?
sp_x = ep.assptensor(x)
@jonasrauber
Copy link
Owner

We have no special support for sparse tensors at the moment. If the sparse TensorFlow tensors can be used like dense tensors, it might work. Adding explicit support for sparse tensors would probably only make sense if PyTorch and JAX support them as well.

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

2 participants