tf.contrib.timeseries.saved_model_utils.cold_start_filter(
signatures,
session,
features
)
Defined in tensorflow/contrib/timeseries/python/timeseries/saved_model_utils.py
.
Perform filtering using an exported saved model.
Filtering refers to updating model state based on new observations. Predictions based on the returned model state will be conditioned on these observations.
Starts from the model's default/uninformed state.
Args:
signatures
: TheMetaGraphDef
protocol buffer returned fromtf.saved_model.loader.load
. Used to determine the names of Tensors to feed and fetch. Must be from the same model ascontinue_from
.session
: The session to use. The session's graph must be the one into whichtf.saved_model.loader.load
loaded the model.features
: A dictionary mapping keys to Numpy arrays, with several possible shapes (requires keysFilteringFeatures.TIMES
andFilteringFeatures.VALUES
): Single example;TIMES
is a scalar andVALUES
is either a scalar or a vector of length [number of features]. Sequence;TIMES
is a vector of shape [series length],VALUES
either has shape series length or series length x number of features. Batch of sequences;TIMES
is a vector of shape [batch size x series length],VALUES
has shape [batch size x series length] or [batch size x series length x number of features]. In any case,VALUES
and any exogenous features must have their shapes prefixed by the shape of the value corresponding to theTIMES
key.
Returns:
A dictionary containing model state updated to account for the observations
in features
.