deepr.predictors package

Submodules

deepr.predictors.base module

Base Class for Predictor.

class deepr.predictors.base.Predictor(session, feed_tensors, fetch_tensors)[source]

Bases: ABC

Base Class for Predictor.

feed_tensors

Input tensors

Type:

Dict[str, tf.Tensor]

fetch_tensors

Output tensors

Type:

Dict[str, tf.Tensor]

session

Tensorflow session

Type:

tf.Session

deepr.predictors.proto module

Proto Predictor.

class deepr.predictors.proto.ProtoPredictor(path, feeds, fetches)[source]

Bases: Predictor

Proto Predictor.

path

Path to .pb file

Type:

str

feeds

Name of feed tensors or operations (inputs)

Type:

Union[str, List[str]]

fetches

Name of fetch tensors or operations (outputs)

Type:

Union[str, List[str]]

deepr.predictors.saved_model module

SavedModel Predictor.

class deepr.predictors.saved_model.SavedModelPredictor(path, feeds=None, fetches=None)[source]

Bases: Predictor

SavedModel Predictor.

path

Path to SavedModel directory

Type:

str

feeds

Name of feed tensors or operations (inputs)

Type:

Union[str, List[str]], optional

fetches

Name of fetch tensors or operations (outputs)

Type:

Union[str, List[str]], optional

deepr.predictors.saved_model.get_latest_saved_model(saved_model_dir)[source]

Get latest sub directory in saved_model_dir.

Parameters:

saved_model_dir (str) – Path to directory containing saved model exports.

Returns:

Return type:

str

Module contents