Hi all,
I'm developing a sequence model which takes as input Seq[String] and produces output labels as Seq[Double] or Vector. I'd like to use the Keras-like API of BigDL on a DataFrame for this purpose.
However, it seems that the current implementation supports scalar (Float or Double) labels only if we use one "label" column. It does not support vector type as label, as the code excerpt shows.
I'm thinking about creating an array of label columns, each storing an element of the label sequence in order to use the SeqToMultipleTensors utility. But it is not a neat solution at all.
Is there a better way to do this?
Thanks,
Phuong
===
val preprocessing = if (labelCols.size == 1) {
FeatureLabelPreprocessing(featurePreprocessing,
ScalarToTensor())
.asInstanceOf[Preprocessing[(Any, Option[Any]), Sample[T]]]
} else {
FeatureLabelsPreprocessing(featurePreprocessing,
SeqToMultipleTensors(labelSizes))
.asInstanceOf[Preprocessing[(Any, Option[Any]), Sample[T]]]
}
===