2017年1月13日星期五

tensorflow将SparseTensor转为Tensor

一个例子:
a = tf.SparseTensor(indices=[[0, 0], [1, 2]], values=[1, 2], shape=[3, 4])
b = tf.sparse_tensor_to_dense(a, default_value = 0, name = 'xxx')

没有评论:

发表评论