sparse matrix - Embedding_lookup_sparse of tensorflow without combiner -


in tensorflow, tf.nn.embedding_lookup_sparse must use combiner, donot want combine result.

for example, weights are:

[[1, 0], [0, 1], [2, 0], [3, 0], [1, 1]] 

sparse_ids

sparsetensorvalue(indices=array([[0, 0], [0, 1], [0, 2], [0, 3], [0, 4]]), values=array([0, 1, 2, 3, 4]), dense_shape=array([1, 5])) 

sparse_values

sparsetensorvalue(indices=array([[0, 0], [0, 1], [0, 2], [0, 3], [0, 4]]), values=array([ 1.        ,  2.        ,  3.20000005,  4.        ,  5.        ], dtype=float32), dense_shape=array([1, 5])) 

the result of embedding_lookup_sparse is

[[ 1.60526316  0.47368421]] 

but hope result is

[[1, 0],  [0, 2],  [6.4, 0],  [12, 0],  [5, 5]] 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -