Используйте tf.SparseTensor и, если требуется, tf.sparse_tensor_to_dense . Например:
import tensorflow as tf
values = [1, 2, 3, 4]
indices = [[0, 1], [1, 0], [1, 2], [2, 1]]
st = tf.SparseTensor(indices, values, dense_shape=[3, 3])
dt = tf.sparse_tensor_to_dense(st)
with tf.Session() as sess:
result = sess.run(dt)
print(result)