def __init__(self,
output_series: str,
encoder: Stateful,
used_session: int = 0) -> None:
"""Initialize the representation runner.
Args:
output_series: Name of the output seriesi with vectors.
encoder: Used encoder.
used_session: Id of the TensorFlow session used in case of model
ensembles.
"""
check_argument_types()
if not isinstance(encoder, ModelPart):
raise TypeError("The encoder of the representation runner has to "
"be an instance of 'ModelPart'")
BaseRunner.__init__(self, output_series, cast(ModelPart, encoder))
self._used_session = used_session # type: int
self._encoded = encoder.output # type: tf.Tensor
# pylint: disable=unused-argument
评论列表
文章目录