How to convert SparseToDense's to Tensor or int array?

136 Views Asked by At

I have implemented LSTM-CTC model in android device and comes to this code block.

SparseToDense sparseDense = ctc_decode(out, input_length, true, beam_width, top_paths);

I am getting the sparseDense object perfectly with expected shape but i don't know how to get retrieve float array from this.

If anyone know, please reply...

Thanks.

1

There are 1 best solutions below

0
Mayur Kanojiya On

** session.runner().fetch(sparseToDense.asOutput()).run() ** were throwing INT64 Sparse OPKernel error, but after converting all the parameters of the SparseToDense to the INT32, it get resolved.