Class/Object

org.platanios.tensorflow.api.learn.estimators

InMemoryEstimator

Related Docs: object InMemoryEstimator | package estimators

Permalink

class InMemoryEstimator[IT, IO, ID, IS, I, TT, TO, TD, TS, EI] extends Estimator[IT, IO, ID, IS, I, TT, TO, TD, TS, EI]

In-memory estimator which is used to train, use, and evaluate TensorFlow models, and uses an underlying TensorFlow session that it keeps alive throughout its lifetime. This means that checkpoint files do not need to be written after every call to train() and do not need to be loaded on every call to infer() or evaluate(), since the underlying TensorFlow session used for all these calls stays alive in the background.

Linear Supertypes
Estimator[IT, IO, ID, IS, I, TT, TO, TD, TS, EI], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InMemoryEstimator
  2. Estimator
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def checkpointConfig: CheckpointConfig

    Permalink

    Checkpoint configuration used by this estimator.

    Checkpoint configuration used by this estimator.

    Definition Classes
    Estimator
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val configuration: Configuration

    Permalink

    Run configuration used for this estimator.

    Run configuration used for this estimator.

    Definition Classes
    Estimator
  8. val configurationBase: Configuration

    Permalink

    Configuration base for this estimator.

    Configuration base for this estimator. This allows for setting up distributed training environments, for example. Note that this is a *base* for a configuration because the estimator might modify it and set some missing fields to appropriate default values, in order to obtain its final configuration that can be obtain through its configuration field.

    Attributes
    protected
    Definition Classes
    InMemoryEstimatorEstimator
  9. val deviceFunction: Option[(OpSpecification) ⇒ String]

    Permalink

    Device function used by this estimator for managing replica device placement when using distributed training.

    Device function used by this estimator for managing replica device placement when using distributed training.

    Definition Classes
    Estimator
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def evaluate(data: () ⇒ Dataset[TT, TO, TD, TS], metrics: Seq[Metric[EI, ops.Output]], maxSteps: Long = 1L, saveSummaries: Boolean = true, name: String = null): Seq[tensors.Tensor[types.FLOAT32]]

    Permalink

    Evaluates the model managed by this estimator given the provided evaluation data, data.

    Evaluates the model managed by this estimator given the provided evaluation data, data.

    The evaluation process is iterative. In each step, a data batch is obtained from data and internal metric value accumulators are updated. The number of steps to perform is controlled through the maxSteps argument. If set to -1, then all batches from data will be processed.

    If metrics is provided, it overrides the value provided in the constructor of this estimator.

    data

    Evaluation dataset. Each element is a tuple over input and training inputs (i.e., supervision labels).

    metrics

    Evaluation metrics to use.

    maxSteps

    Maximum number of evaluation steps to perform. If -1, the evaluation process will run until data is exhausted.

    saveSummaries

    Boolean indicator specifying whether to save the evaluation results as summaries in the working directory of this estimator.

    name

    Name for this evaluation. If provided, it will be used to generate an appropriate directory name for the resulting summaries. If saveSummaries is false, this argument has no effect. This is useful if the user needs to run multiple evaluations on different data sets, such as on training data vs test data. Metrics for different evaluations are saved in separate folders, and appear separately in TensorBoard.

    returns

    Evaluation metric values at the end of the evaluation process. The return sequence matches the ordering of metrics.

    Definition Classes
    InMemoryEstimatorEstimator
    Annotations
    @throws( ... )
    Exceptions thrown

    InvalidArgumentException If saveSummaries is true, but the estimator has no working directory specified.

  13. val evaluateHooks: Set[Hook]

    Permalink

    Hooks to use while evaluating.

  14. val evaluationMetrics: Seq[Metric[EI, ops.Output]]

    Permalink

    Evaluation metrics to use.

  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def getOrCreateSaver(): Option[Saver]

    Permalink

    Gets an existing saver from the current graph, or creates a new one if none exists.

    Gets an existing saver from the current graph, or creates a new one if none exists.

    Attributes
    protected
    Definition Classes
    Estimator
  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. def infer[InferInput, InferOutput, ModelInferenceOutput](input: () ⇒ InferInput)(implicit evFetchableIO: Aux[IO, IT], evFetchableI: Aux[I, ModelInferenceOutput], evFetchableIIO: Aux[(IO, I), (IT, ModelInferenceOutput)], ev: SupportedInferInput[InferInput, InferOutput, IT, IO, ID, IS, ModelInferenceOutput]): InferOutput

    Permalink

    Infers output (i.e., computes predictions) for input using the model managed by this estimator.

    Infers output (i.e., computes predictions) for input using the model managed by this estimator.

    input can be of one of the following types:

    • A Dataset, in which case this method returns an iterator over (input, output) tuples corresponding to each element in the dataset. Note that the predictions are computed lazily in this case, whenever an element is requested from the returned iterator.
    • A single input of type IT, in which case this method returns a prediction of type I.

    Note that, ModelInferenceOutput refers to the tensor type that corresponds to the symbolic type I. For example, if I is (Output, Output), then ModelInferenceOutput will be (Tensor, Tensor).

    input

    Input for the predictions.

    returns

    Either an iterator over (IT, ModelInferenceOutput) tuples, or a single element of type I, depending on the type of input.

    Definition Classes
    InMemoryEstimatorEstimator
  20. val inferHooks: Set[Hook]

    Permalink

    Hooks to use while inferring.

  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. val modelFunction: ModelFunction[IT, IO, ID, IS, I, TT, TO, TD, TS, EI]

    Permalink

    Model-generating function that can optionally have a Configuration argument which will be used to pass the estimator's configuration to the model and allows customizing the model based on the execution environment.

    Model-generating function that can optionally have a Configuration argument which will be used to pass the estimator's configuration to the model and allows customizing the model based on the execution environment.

    Attributes
    protected
    Definition Classes
    InMemoryEstimatorEstimator
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def randomSeed: Option[Int]

    Permalink

    Random seed value to be used by the TensorFlow initializers in this estimator.

    Random seed value to be used by the TensorFlow initializers in this estimator.

    Definition Classes
    Estimator
  27. def saveEvaluationSummaries(step: Long, metrics: Seq[Metric[EI, ops.Output]], metricValues: Seq[tensors.Tensor[types.FLOAT32]], name: String = null): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Estimator
  28. def sessionConfig: Option[SessionConfig]

    Permalink

    Session configuration used by this estimator.

    Session configuration used by this estimator.

    Definition Classes
    Estimator
  29. val stopCriteria: StopCriteria

    Permalink
  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. val tensorBoardConfig: TensorBoardConfig

    Permalink

    TensorBoard configuration to use while training.

    TensorBoard configuration to use while training. If provided, a TensorBoard server is launched while training, using the provided configuration. In that case, it is required that TensorBoard is installed for the default Python environment in the system. If training in a distributed setting, the TensorBoard server is launched on the chief node.

  32. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  33. def train(data: () ⇒ Dataset[TT, TO, TD, TS], stopCriteria: StopCriteria = this.stopCriteria): Unit

    Permalink

    Trains the model managed by this estimator.

    Trains the model managed by this estimator.

    data

    Training dataset. Each element is a tuple over input and training inputs (i.e., supervision labels).

    stopCriteria

    Stop criteria to use for stopping the training iteration. For the default criteria please refer to the documentation of StopCriteria.

    Definition Classes
    InMemoryEstimatorEstimator
  34. val trainChiefOnlyHooks: Set[Hook]

    Permalink

    Hooks to use while training for the chief node only.

    Hooks to use while training for the chief node only. This argument is only useful for a distributed training setting.

  35. val trainHooks: Set[Hook]

    Permalink

    Hooks to use while training (e.g., logging for the loss function value, etc.).

  36. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. def workingDir: Option[Path]

    Permalink

    Working directory used by this estimator, used to save model parameters, graph, etc.

    Working directory used by this estimator, used to save model parameters, graph, etc. It can also be used to load checkpoints for a previously saved model.

    Definition Classes
    Estimator

Inherited from Estimator[IT, IO, ID, IS, I, TT, TO, TD, TS, EI]

Inherited from AnyRef

Inherited from Any

Ungrouped