Package

org.platanios.tensorflow.api

ops

Permalink

package ops

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ops
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class EmbeddingMap(partitionParameters: Seq[EmbeddingParameters]) extends Product with Serializable

    Permalink
  2. trait EmbeddingParameters extends AnyRef

    Permalink

    Trait for specifying supported embedding parameter types.

  3. case class Function[I, O](name: String, function: (I) ⇒ O)(implicit evInput: ArgType[I], evOutput: ArgType[O]) extends Product with Serializable

    Permalink

  4. class FunctionGraph extends core.Graph

    Permalink

    Graph extension helper for constructing a function.

    Graph extension helper for constructing a function.

    A FunctionGraph keeps track of all inputs into every op created inside it. If any input is from another graph, we keep track of it and substitute the input with a placeholder.

    Each captured input's corresponding placeholder is converted into a function argument and the caller passes in the captured tensor.

  5. final case class GraphConstructionScope(graph: Graph = Graph(), nameScope: String = "", device: String = "", deviceFunction: (OpSpecification) ⇒ String = _.device, colocationOps: Set[Op] = Set.empty, controlDependencies: Set[Op] = Set.empty, attributes: Map[String, Any] = Map.empty, container: String = "", controlFlowContext: Option[Context] = None, outerContext: Option[GraphConstructionScope] = None) extends Product with Serializable

    Permalink
  6. final case class Input extends Product with Serializable

    Permalink

    Wrapper around an Op meant to represent one of its inputs.

    Wrapper around an Op meant to represent one of its inputs. Actual op inputs have type Output since they represent outputs of other ops. Currently, Input is only useful for representing consumers of an Op's outputs.

  7. final case class Op extends Product with Serializable

    Permalink

    Represents a graph node, or as we shall call it, an operation, that performs computation on tensors.

    Represents a graph node, or as we shall call it, an operation, that performs computation on tensors.

    TODO: Add Op.run method and Op.Output.eval method.

    An Op is a symbolic representation of the computation it performs. It is a node in a TensorFlow Graph that takes zero or more Op.Output objects as input, and produces zero or more Op.Output objects as output. Op objects are constructed by calling op creation functions, such as Basic.constant or Math.matmul.

    For example, val c = MathOps.matmul(a, b) creates an Op of type "MatMul" that takes Op.Outputs a and b as input, and produces Op.Output c as output.

    Note

    The Op.Input class is simply a wrapper around an Op meant to represent one of its inputs. Actual op inputs have type Op.Output since they represent outputs of other ops. Currently, Op.Input is only useful for representing consumers of an Op's outputs. After the graph has been launched in a Session, an Op can be executed by using Session.run. TODO: Add Op.run use example, once that is supported.

  8. final case class OpSpecification(name: String, opType: String, device: String) extends Product with Serializable

    Permalink
  9. final case class Output extends OutputLike with Product with Serializable

    Permalink

    Representation of one of the outputs of an Op's computation.

    Representation of one of the outputs of an Op's computation.

    An Output is a symbolic handle to one of the outputs of an Op. It does not hold the values of that op's output, but instead provides a means of computing those values in a TensorFlow Session.

    This class has two primary purposes:

    1. An Output can be passed as input to another Op. This builds a dataflow connection between ops, which enables TensorFlow to execute an entire Graph that represents a large, multi-step computation. 2. After the graph has been launched in a Session, the value of an Output can be computed by passing it to Session.run. 3. Output.evaluate can also be used to compute the value of an Output If no session is provided, then the default session is used.

    In the following example, c, d, and e are symbolic Output objects, whereas result is a Scala array that stores a concrete value:

    val c = constant(Array(Array(1.0, 2.0), Array(3.0, 4.0)))
    val d = constant(Array(Array(1.0, 1.0), Array(0.0, 1.0)))
    val e = matmul(c, d)
    val result = e.evaluate() // 'result' now holds the result of the matrix multiplication.
  10. trait OutputConvertible extends AnyRef

    Permalink

    Helper tagging trait used to group Outputs, OutputIndexedSlices, SparseOutputs, and TensorArrays under the same type.

    Helper tagging trait used to group Outputs, OutputIndexedSlices, SparseOutputs, and TensorArrays under the same type. It is useful for the while loop variable map function which is used in the seq2seq package.

  11. final case class OutputIndexedSlices(indices: Output, values: Output, denseShape: Output = null) extends OutputLike with Product with Serializable

    Permalink

    Sparse representation of a set of tensor slices at given indices.

    Sparse representation of a set of tensor slices at given indices.

    This class if a simple wrapper for a pair (or a set of three) of Output objects:

    • indices: A one-dimensional integer Output with shape [D0].
    • values: An Output of any data type, with shape [D0, D1, ..., Dn].
    • denseShape: Optionally, an integer Output with shape [LARGE0, D1, ..., Dn].

    An OutputIndexedSlices is typically used to represent a subset of a larger Output, dense, of shape [LARGE0, D1, ..., Dn], where LARGE0 >> D0. The values in indices are the indices in the first dimension of the slices that have been extracted from the larger tensor.

    The dense Output, dense, represented by OutputIndexedSlices, slices, has:

    dense(slices.indices(i), ::, ::, ...) = slices.values(i, ::, ::, ...)

    The OutputIndexedSlices class is used primarily in the definition of gradients for operations that have sparse gradients, such as gather.

    Note that this is different than SparseOutput which uses multi-dimensional indices and scalar values.

    indices

    Indices along the first dimension of the corresponding dense Output.

    values

    Values corresponding to the provided indices.

    denseShape

    Shape of the corresponding dense Output.

  12. sealed trait OutputLike extends OutputConvertible

    Permalink

    Trait representing outputs of an Op's computation.

  13. trait Parsing extends AnyRef

    Permalink

    Contains functions for constructing ops related to parsing data.

  14. class Queue extends AnyRef

    Permalink

    Class that supports all TensorFlow queue implementations.

    Class that supports all TensorFlow queue implementations.

    A queue is a TensorFlow data structure that stores tensors across multiple steps, and exposes operations that enqueue and dequeue tensors.

    Each queue element is a sequence/tuple of one or more tensors, where each tuple component has a static data type, and may have a statically-known shape. The queue implementations support versions of enqueue and dequeue that handle single elements and versions that support enqueuing and dequeuing many elements at once.

  15. case class Resource(handle: Output, initializeOp: Op, isInitialized: Output) extends Product with Serializable

    Permalink

    Represents a TensorFlow resource.

    Represents a TensorFlow resource.

    handle

    Handle to the resource.

    initializeOp

    Op that initializes the resource.

    isInitialized

    BOOLEAN scalar tensor denoting whether this resource has been initialized.

  16. trait Resources extends AnyRef

    Permalink
  17. trait SetOps[A] extends AnyRef

    Permalink

    Type trait specifying the supported types for set operation inputs.

  18. final case class SparseOutput(indices: Output, values: Output, denseShape: Output) extends OutputLike with Product with Serializable

    Permalink

    Represents a sparse op output.

    Represents a sparse op output.

    TensorFlow represents a sparse tensor as three separate dense tensors: indices, values, and denseShape. In Scala, the three tensors are collected into a SparseOutput class for ease of use. If you have separate indices, values, and denseShape tensors, wrap them in a SparseTensor object before passing to the relevant sparse tensor manipulation.

    Concretely, the sparse tensor SparseOutput(indices, values, denseShape) comprises the following components, where N and rank are the number of values and number of dimensions in the SparseOutput, respectively:

    • indices: Two-dimensional INT64 tensor with shape [N, rank], which specifies the indices of the elements in the sparse tensor that have nonzero values (elements are zero-indexed). For example, indices = 3], [2, 4 specifies that the elements with indexes [1, 3] and [2, 4] have nonzero values.
    • values: One-dimensional tensor of any type, with shape [N], which supplies the values for each element in indices. For example, given indices = 3], [2, 4, the parameter values = [18, 3.6] specifies that element [1, 3] of the sparse tensor has a value of 18, and element [2, 4] of the tensor has a value of 3.6.
    • denseShape: One-dimensional INT64 tensor with shape [rank], which specifies the dense shape of the sparse tensor. For example, denseShape = [3, 6] specifies a two-dimensional 3x6 tensor, denseShape = [2, 3, 4] specifies a three-dimensional 2x3x4 tensor, and denseShape = [9] specifies a one-dimensional tensor with 9 elements.

    The corresponding dense tensor, dense, satisfies:

    dense.shape == denseShape
    dense(indices(i)) = values(i) // Using a somewhat loose notation with respect to indexing.

    IMPORTANT NOTE: By convention, indices should be sorted in row-major order (or equivalently lexicographic order on indices(i)). This is not enforced when SparseTensor objects are constructed, but most ops assume correct ordering. If the ordering of sparse tensor st is wrong, a fixed version can be obtained by calling sparseReorder(st).

    For example, the sparse tensor SparseOutput(indices = 0], [1, 2, values = [1, 2], denseShape = [3, 4]), represents the dense tensor 0, 0, 0], [0, 0, 2, 0], [0, 0, 0, 0.

    indices

    Two-dimensional INT32 or INT64 tensor with shape [N, rank].

    values

    One-dimensional tensor with shape [N].

    denseShape

    One-dimensional INT32 or INT64 tensor with shape [rank].

  19. case class TensorArray extends OutputConvertible with Product with Serializable

    Permalink

    Class wrapping dynamic-sized, per-time-step, write-once tensor arrays.

    Class wrapping dynamic-sized, per-time-step, write-once tensor arrays.

    This class is meant to be used with dynamic iteration primitives such as whileLoop and mapFunction. It supports gradient back-propagation via special "flow" control flow dependencies.

    Note that the name of the TensorArray (even if passed in) is uniquified automatically. Each time a new TensorArray is created at runtime it is assigned its own name for the duration of the run. This avoids name collisions if a TensorArray is created within a whileLoop.

Value Members

  1. object Basic extends Basic

    Permalink
  2. object Cast extends Cast

    Permalink
  3. object Clip extends Clip

    Permalink
  4. object Embedding extends Embedding

    Permalink
  5. object Function extends Serializable

    Permalink
  6. object FunctionGraph

    Permalink

    Contains helper functions for dealing with function graphs.

  7. object Gradients

    Permalink

  8. object InstantiatedFunction

    Permalink
  9. object Math extends Math

    Permalink
  10. object NN extends NN

    Permalink
  11. object Op extends Serializable

    Permalink
  12. object Output extends Serializable

    Permalink
  13. object Resources extends Resources

    Permalink
  14. object SetOps

    Permalink
  15. object Sparse extends Sparse

    Permalink
  16. object Statistics extends Statistics

    Permalink
  17. object TensorArray extends Serializable

    Permalink
  18. object Text extends Text

    Permalink
  19. package control_flow

    Permalink

  20. package distributions

    Permalink
  21. package io

    Permalink

    Contains helper functions and classes for creating IO-related ops.

  22. package lookup

    Permalink

  23. package metrics

    Permalink

  24. package rnn

    Permalink

  25. package seq2seq

    Permalink

  26. package training

    Permalink

  27. package variables

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped