MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / predict

Method predict

tensorflow/python/distribute/hvd_strategy.py:1394–1417  ·  view source on GitHub ↗

r'''Predict method of estimator in HB.

(
                self, input_fn,
                predict_keys=None,
                hooks=None,
                checkpoint_path=None,
                yield_single_examples=True)

Source from the content-addressed store, hash-verified

1392 }
1393
1394 def predict(
1395 self, input_fn,
1396 predict_keys=None,
1397 hooks=None,
1398 checkpoint_path=None,
1399 yield_single_examples=True):
1400 r'''Predict method of estimator in HB.
1401 '''
1402 _estimator_lib._estimator_api_gauge.get_cell(
1403 'predict').set(True) # pylint: disable=protected-access
1404 if self.config.cluster_spec:
1405 if estimator_training.should_run_distribute_coordinator(self.config):
1406 raise ValueError(
1407 'Running `evaluate` with Distribute Coordinator '
1408 'not supported.')
1409 if not _is_google_env():
1410 start_std_server(self.config)
1411
1412 return self._actual_predict(
1413 input_fn,
1414 predict_keys=predict_keys,
1415 hooks=hooks,
1416 checkpoint_path=checkpoint_path,
1417 yield_single_examples=yield_single_examples)
1418
1419 return HorovodEstimator
1420

Callers 2

_load_and_run_modelMethod · 0.45
_predict_with_modelMethod · 0.45

Calls 4

_actual_predictMethod · 0.95
start_std_serverFunction · 0.85
setMethod · 0.45
get_cellMethod · 0.45

Tested by 2

_load_and_run_modelMethod · 0.36
_predict_with_modelMethod · 0.36