tensorfx.prediction

class tensorfx.prediction.Model(session, inputs, outputs)

A model provides performs inferences using TensorFlow to produce predictions.

A model is loaded from a checkpoint that was produced during training.

classmethod load(path)

Imports a previously exported saved model.

Parameters:path (-) – The location on disk where the saved model exists.
Returns:An initialized Model object that can be used for performing prediction.
predict(instances)

Performs inference to return predictions for the specified instances of data.

Parameters:instances (-) – either an object, or list of objects each containing feature values.
static save(session, path, inputs, outputs)

Exports the current session, the loaded graph, and variables into a saved model.

Parameters:
  • session (-) – the TensorFlow session with variables to save.
  • path (-) – the location where the output model directory should be created.
  • inputs (-) – the list of tensors constituting the input to the prediction graph.
  • outputs (-) – the list of tensors constituting the outputs of the prediction graph.