Skip to content

Commit

Permalink
support multi input models for nnframes (intel-analytics#1553)
Browse files Browse the repository at this point in the history
* support multi input for nnframes

* update ut

* add doc and unit test

* doc update

* scala style
  • Loading branch information
hhbyyh committed Aug 20, 2019
1 parent 095e11d commit 02530bc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python/dllib/src/bigdl/dllib/feature/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,15 @@ def __init__(self, size=[], bigdl_type="float"):
super(SeqToTensor, self).__init__(bigdl_type, size)


class SeqToMultipleTensors(Preprocessing):
"""
a Transformer that converts an Array[_] or Seq[_] or ML Vector to several tensors.
:param size, list of int list, dimensions of target Tensors, e.g. [[2],[4]]
"""
def __init__(self, size=[], bigdl_type="float"):
super(SeqToMultipleTensors, self).__init__(bigdl_type, size)


class ArrayToTensor(Preprocessing):
"""
a Transformer that converts an Array[_] to a Tensor.
Expand Down

0 comments on commit 02530bc

Please sign in to comment.