예제 #1
0
 def prediction_input_fn():
     return ({
         PredictionFeatures.TIMES:
         training.limit_epochs(predict_times, num_epochs=1),
         PredictionFeatures.STATE_TUPLE:
         (state_times, state_values, state_exogenous)
     }, {})
예제 #2
0
 def prediction_input_fn():
   return ({
       PredictionFeatures.TIMES: training.limit_epochs(
           predict_times, num_epochs=1),
       PredictionFeatures.STATE_TUPLE: (state_times,
                                        state_values,
                                        state_exogenous)
   }, {})
예제 #3
0
 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)
예제 #4
0
 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)