spotify/zoltar

Helper method to feed sparse arrays into TF

nevillelyh opened this issue · 0 comments

We should add some convenience methods, maybe in TensorFlowExtras, to feed Featran FloatSparseArray and DoubleSparseArray into TensorFlow.

https://github.com/spotify/featran/blob/master/java/src/main/scala/com/spotify/featran/java/JavaOps.scala#L126

The feeding code might look like this:

runner
            .feed("input/raw_indices", Tensors.create(new long[]{0, 5, 9}))
            .feed("input/raw_shape", Tensors.create(new long[]{10}))
            .feed("input/raw_data", Tensors.create(new double[]{1.0, 2.0, 3.0}));