There is a small snippet about loading sparse data but I have no idea how to use it.
SparseTensors don\'t play well with queues. If you use SparseTensors
If you are passing sparse values as inputs , you need to create sparse placeholders using tf.sparse_placeholder
.
You should then convert your sparse tensors to dense tensor using tf.sparse_to_dense
.
For this you need to explicitly pass the sparse matrix's values , shape and indices while feeding the data in feed_dict and then later use tf.sparse_to_dense
in the graph.
In the graph :
dense = tf.sparse_to_dense(
sparse_indices=sparse_placeholder.indices,
output_shape=sparse_placeholder.shape,
sparse_values=sparse_placeholder.values,
validate_indices=False)
In the feed_dict:
sparse_placeholder:tf.SparseTensorValue(indices=indices,values=sparse_values,dense_shape=sparse_shape)