I'm trying to use tf.nn.embedding_lookup() and I get the following warning:
UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
I read in this link that to avoid this issue we should ensure that the params input to tf.nn.embedding_lookup() is a tf.Variable
But what I pass to tf.nn.embedding_lookup() is already a tensor that is the output of another operation, and I imagine I cannot use it to initialize the tf.Variable.
Is there a way to convert a tensor to tf.Variable or initialize one with another tensor?