SciSharp/Numpy.NET

Unable to cast Keras.Utils.Sequence[] to NDarray

Closed this issue · 1 comments

Does Numpy.NET have any way of converting a Sequence[] into a NDarray.
So far all I've attempted hasn't worked,

This is a snippet of what I'm trying to accomplish.

var sequences = tokenizer.TextsToSequences(text);
SequenceUtil.PadSequences(sequences, MAX_LENGTH)

sequences is returned as a Sequence array and the PadSequences method requires an NDarray.
However casting w/ np.asarray throws the error Unable to cast Keras.Utils.Sequence[] to NDarray.
Any ideas of how to proceed?

henon commented

I'd suggest you extract a c# array from Sequence[] if possible. Numpy.NET has of course no knowledge of Keras