Is sparse tensor multiplication implemented in TensorFlow?

前端 未结 5 974
夕颜
夕颜 2020-12-13 14:11

Multiplication of sparse tensors with themselves or with dense tensors does not seem to work in TensorFlow. The following example



        
5条回答
  •  -上瘾入骨i
    2020-12-13 14:45

    tf.sparse_matmul is for multiplying two dense tensor not sparse type of data structure. That function is just an optimized version of tensor multiplication if the given matrix (or both two matrixes) have many zero value. Again it does not accept sparse tensor data type. It accepts dense tensor data type. It might fasten your calculations if values are mostly zero.

    as far as I know there is no implementation of two sparse type tensor muliplication. but just one sparse one dense which is tf.sparse_tensor_dense_matmul(x, y) !

提交回复
热议问题