tf.contrib.timeseries.OneShotPredictionHead
Stay organized with collections
Save and categorize content based on your preferences.
A time series head which exports a single stateless serving signature.
tf.contrib.timeseries.OneShotPredictionHead(
model, state_manager, optimizer, input_statistics_generator=None, name=None
)
The serving default signature exported by this head expects times
, values
,
and any exogenous features, but no state. values
has shape [batch_size,
filter_length, num_features]
and times
has shape [batch_size,
total_length]
, where total_length > filter_length
. Any exogenous features
must have their shapes prefixed by the shape of the times
feature.
When serving, first performs filtering on the series up to filter_length
starting from the default start state for the model, then computes predictions
on the remainder of the series, returning them.
Model state is neither accepted nor returned, so filtering must be performed
each time predictions are requested when using this head.
Args |
model
|
A model for time series regression.
|
state_manager
|
A state manager.
|
optimizer
|
An optimizer.
|
input_statistics_generator
|
A input statistics generator.
|
name
|
An optional name for the model.
|
Attributes |
logits_dimension
|
See _Head .
|
name
|
The name of this head.
|
Methods
create_estimator_spec
View source
create_estimator_spec(
features, mode, labels=None
)
Performs basic error checking and returns an EstimatorSpec.
create_loss
View source
create_loss(
features, mode, logits=None, labels=None
)
See _Head
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.timeseries.OneShotPredictionHead\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/timeseries/python/timeseries/head.py#L280-L367) |\n\nA time series head which exports a single stateless serving signature. \n\n tf.contrib.timeseries.OneShotPredictionHead(\n model, state_manager, optimizer, input_statistics_generator=None, name=None\n )\n\nThe serving default signature exported by this head expects `times`, `values`,\nand any exogenous features, but no state. `values` has shape `[batch_size,\nfilter_length, num_features]` and `times` has shape `[batch_size,\ntotal_length]`, where `total_length \u003e filter_length`. Any exogenous features\nmust have their shapes prefixed by the shape of the `times` feature.\n\nWhen serving, first performs filtering on the series up to `filter_length`\nstarting from the default start state for the model, then computes predictions\non the remainder of the series, returning them.\n\nModel state is neither accepted nor returned, so filtering must be performed\neach time predictions are requested when using this head.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|------------------------------|-------------------------------------|\n| `model` | A model for time series regression. |\n| `state_manager` | A state manager. |\n| `optimizer` | An optimizer. |\n| `input_statistics_generator` | A input statistics generator. |\n| `name` | An optional name for the model. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|--------------------|------------------------|\n| `logits_dimension` | See `_Head`. |\n| `name` | The name of this head. |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `create_estimator_spec`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/timeseries/python/timeseries/head.py#L232-L277) \n\n create_estimator_spec(\n features, mode, labels=None\n )\n\nPerforms basic error checking and returns an EstimatorSpec.\n\n### `create_loss`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/timeseries/python/timeseries/head.py#L81-L88) \n\n create_loss(\n features, mode, logits=None, labels=None\n )\n\nSee `_Head`."]]