Type LSTMAutoRegressor
Namespace tensorflow_estimator.python.estimator.canned.timeseries.estimators
Parent TimeSeriesRegressor
Interfaces ILSTMAutoRegressor
Methods
- build_one_shot_parsing_serving_input_receiver_fn
- build_one_shot_parsing_serving_input_receiver_fn_dyn
- build_raw_serving_input_receiver_fn
- build_raw_serving_input_receiver_fn_dyn
- NewDyn
Properties
Public instance methods
object build_one_shot_parsing_serving_input_receiver_fn(object filtering_length, object prediction_length, object default_batch_size, DType values_input_dtype, bool truncate_values)
Build an input_receiver_fn for export_savedmodel accepting tf.Examples. Only compatible with `OneShotPredictionHead` (see `head`).
Parameters
-
object
filtering_length - The number of time steps used as input to the model, for which values are provided. If more than `filtering_length` values are provided (via `truncate_values`), only the first `filtering_length` values are used.
-
object
prediction_length - The number of time steps requested as predictions from the model. Times and all exogenous features must be provided for these steps.
-
object
default_batch_size - If specified, must be a scalar integer. Sets the batch size in the static shape information of all feature Tensors, which means only this batch size will be accepted by the exported model. If None (default), static shape information for batch sizes is omitted.
-
DType
values_input_dtype - An optional dtype specification for values in the tf.Example protos (either float32 or int64, since these are the numeric types supported by tf.Example). After parsing, values are cast to the model's dtype (float32 or float64).
-
bool
truncate_values - If True, expects `filtering_length + prediction_length` values to be provided, but only uses the first `filtering_length`. If False (default), exactly `filtering_length` values must be provided.
Returns
-
object
- An input_receiver_fn which may be passed to the Estimator's
export_savedmodel. Expects features contained in a vector of serialized tf.Examples with
shape [batch size] (dtype
tf.string
), each tf.Example containing features with the following shapes:
object build_one_shot_parsing_serving_input_receiver_fn_dyn(object filtering_length, object prediction_length, object default_batch_size, object values_input_dtype, ImplicitContainer<T> truncate_values)
Build an input_receiver_fn for export_savedmodel accepting tf.Examples. Only compatible with `OneShotPredictionHead` (see `head`).
Parameters
-
object
filtering_length - The number of time steps used as input to the model, for which values are provided. If more than `filtering_length` values are provided (via `truncate_values`), only the first `filtering_length` values are used.
-
object
prediction_length - The number of time steps requested as predictions from the model. Times and all exogenous features must be provided for these steps.
-
object
default_batch_size - If specified, must be a scalar integer. Sets the batch size in the static shape information of all feature Tensors, which means only this batch size will be accepted by the exported model. If None (default), static shape information for batch sizes is omitted.
-
object
values_input_dtype - An optional dtype specification for values in the tf.Example protos (either float32 or int64, since these are the numeric types supported by tf.Example). After parsing, values are cast to the model's dtype (float32 or float64).
-
ImplicitContainer<T>
truncate_values - If True, expects `filtering_length + prediction_length` values to be provided, but only uses the first `filtering_length`. If False (default), exactly `filtering_length` values must be provided.
Returns
-
object
- An input_receiver_fn which may be passed to the Estimator's
export_savedmodel. Expects features contained in a vector of serialized tf.Examples with
shape [batch size] (dtype
tf.string
), each tf.Example containing features with the following shapes:
object build_raw_serving_input_receiver_fn(object default_batch_size, object default_series_length)
Build an input_receiver_fn for export_savedmodel which accepts arrays. Automatically creates placeholders for exogenous `FeatureColumn`s passed to
the model.
Parameters
-
object
default_batch_size - If specified, must be a scalar integer. Sets the batch size in the static shape information of all feature Tensors, which means only this batch size will be accepted by the exported model. If None (default), static shape information for batch sizes is omitted.
-
object
default_series_length - If specified, must be a scalar integer. Sets the series length in the static shape information of all feature Tensors, which means only this series length will be accepted by the exported model. If None (default), static shape information for series length is omitted.
Returns
-
object
- An input_receiver_fn which may be passed to the Estimator's export_savedmodel.
object build_raw_serving_input_receiver_fn_dyn(object default_batch_size, object default_series_length)
Build an input_receiver_fn for export_savedmodel which accepts arrays. Automatically creates placeholders for exogenous `FeatureColumn`s passed to
the model.
Parameters
-
object
default_batch_size - If specified, must be a scalar integer. Sets the batch size in the static shape information of all feature Tensors, which means only this batch size will be accepted by the exported model. If None (default), static shape information for batch sizes is omitted.
-
object
default_series_length - If specified, must be a scalar integer. Sets the series length in the static shape information of all feature Tensors, which means only this series length will be accepted by the exported model. If None (default), static shape information for series length is omitted.
Returns
-
object
- An input_receiver_fn which may be passed to the Estimator's export_savedmodel.