Commit a552f517 authored by Pavel KORSHUNOV's avatar Pavel KORSHUNOV
Browse files

allow blocks of features in tf evaluation

parent 5b428b7c
...@@ -197,6 +197,16 @@ class TensorflowEval(Algorithm): ...@@ -197,6 +197,16 @@ class TensorflowEval(Algorithm):
""" """
if len(feature) > 0: if len(feature) > 0:
# if we have a set of independent blocks to process
# collect all projections and flatten them in one output array
if isinstance(feature, list):
projections = []
for feat in feature:
feat = numpy.cast['float32'](feat)
return numpy.asarray(projections, dtype=numpy.float32)
feature = numpy.cast['float32'](feature) feature = numpy.cast['float32'](feature)
self._check_feature(feature) self._check_feature(feature)
return self.project_feature(feature) return self.project_feature(feature)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment