tensorflow / java

Java bindings for TensorFlow
Apache License 2.0
829 stars 201 forks source link

Embeddings Lookup #314

Open danilojsl opened 3 years ago

danilojsl commented 3 years ago

I am working with tensorflow-java version 0.2.0 trying to find some feature similar to tf.nn.embedding_lookup.

I found operations LookupTableInsert and LookupTableFind. Are any of these similar to tf.nn.embedding_lookup? In addition, these operations require a tableHandle argument which I don't know how to fill in.

Could you please guide me on how to use these operations?

Thanks

Craigacp commented 3 years ago

tf.nn.embedding_lookup is a layer of python over the top of a gather call, which we have in the core ops. There's a bit of complexity there as the thing it looks up in could be partitioned and I've not traced that through yet. We don't have a wrapper around it at the moment, if you want to work on one that would be great.

AgnidiptoSinha commented 1 month ago

Hey @danilojsl , I know this issue is pretty old. But is there any appropriate feature similar to tf.nn.embedding_lookup in Java bindings yet? If so, could you let me know the function/operation name?

Craigacp commented 1 month ago

We have not added a wrapper around the gather ops yet.