java icon indicating copy to clipboard operation
java copied to clipboard

Do we support SparseOutput?

Open mullerhai opened this issue 3 years ago • 2 comments
trafficstars

HI : for sparse tensor ,I think we need SparseOutput which implement from Output[T], but I found in the package org.tensorflow ,final class Output<T extends TType> implements Operand<T> ,Output class can not inherit 。 I don't know why.

mullerhai avatar Feb 18 '22 06:02 mullerhai

like org.tensorflow.SparseTensor

mullerhai avatar Feb 18 '22 07:02 mullerhai

Right now, dense tensors inside a sparse tensor (i.e. the indices, values and denseShape) needs to be passed individually by the user to one of the sparse ops that we have (as you see [here], all sparse ops expect individual tensors to be passed as operands).

Eventually we'll hide this conversion to the user by wrapping up the sparse ops to accept a single sparse operand (or sparse output) but we are not there yet, all contributions are welcome if you think you can tackle this one!

karllessard avatar Feb 22 '22 03:02 karllessard