You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The StringLookup layer uses tensorflow internally, it relies on tensorflow operations and expects tf.tensors. Using tf.tensor or a np.array works fine with tensorflow backend but using torch.tensor or np.array raises a Value Error with torch backend in this gist. We'll look into this and update you.
One could convert the torch tensor into a TF tensor as part of the StringLookup, and then convert back as output. If you'd like, we're open to contributions on this, @DLumi
@VarunS1997 correct me if I'm wrong, but if the package is multi-backend, it means it should be able to run itself on just one backend completely fine. So the way I see it, the function should have equivalents for torch and jax without relying on tensorflow at all. Or it needs to be axed entirely.
keras.layers.StringLookup throws an error when calling on a torch.Tensor or a numpy array (although, both are supposed to be valid backends?)
Colab example:
https://colab.research.google.com/drive/1MYcIsJJuiPcvykC8ifOyE4vQk6aAo2UQ
Am I missing something here, or torch support didn't reach here yet?
The text was updated successfully, but these errors were encountered: