def prediction_input_fn(): return ({ PredictionFeatures.TIMES: training.limit_epochs(predict_times, num_epochs=1), PredictionFeatures.STATE_TUPLE: (state_times, state_values, state_exogenous) }, {})
def prediction_input_fn(): return ({ PredictionFeatures.TIMES: training.limit_epochs( predict_times, num_epochs=1), PredictionFeatures.STATE_TUPLE: (state_times, state_values, state_exogenous) }, {})
def _predict_input_fn(): """An input_fn for predict().""" # Prevents infinite iteration with a constant output in an Estimator's # predict(). limited_features = {} for key, values in features.items(): limited_values = nest.map_structure( lambda value: training.limit_epochs(value, num_epochs=1), values) limited_features[key] = limited_values return (limited_features, None)