Packages

package function

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. final case class FunctionDef(signature: Option[OpDef] = _root_.scala.None, attr: Map[String, AttrValue] = ..., argAttr: Map[Int, ArgAttrs] = ..., resourceArgUniqueId: Map[Int, Int] = ..., nodeDef: Seq[NodeDef] = _root_.scala.Seq.empty, ret: Map[String, String] = ..., controlRet: Map[String, String] = ..., unknownFields: UnknownFieldSet = ...) extends GeneratedMessage with Updatable[FunctionDef] with Product with Serializable

    A function can be instantiated when the runtime can bind every attr with a value.

    A function can be instantiated when the runtime can bind every attr with a value. When a GraphDef has a call to a function, it must have binding for every attr defined in the signature.

    TODO(zhifengc): * device spec, etc.

    signature

    The definition of the function's name, arguments, return values, attrs etc.

    attr

    Attributes specific to this function definition.

    resourceArgUniqueId

    Unique IDs for each resource argument, used to track aliasing resources. If Argument A and Argument B alias each other, then resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. If this field is empty, none of the arguments could alias; otherwise, every resource argument should have an entry in this field. When instantiated, the unique IDs will be attached to the _Arg nodes' "_resource_arg_unique_id" attribute.

    nodeDef

    By convention, "op" in node_def is resolved by consulting with a user-defined library first. If not resolved, "func" is assumed to be a builtin op.

    ret

    A mapping from the output arg names from signature to the outputs from node_def that should be returned by the function.

    controlRet

    A mapping from control output names from signature to node names in node_def which should be control outputs of this function.

    Annotations
    @SerialVersionUID()
  2. final case class FunctionDefLibrary(function: Seq[FunctionDef] = _root_.scala.Seq.empty, gradient: Seq[GradientDef] = _root_.scala.Seq.empty, unknownFields: UnknownFieldSet = ...) extends GeneratedMessage with Updatable[FunctionDefLibrary] with Product with Serializable

    A library is a set of named functions.

    A library is a set of named functions.

    Annotations
    @SerialVersionUID()
  3. final case class GradientDef(functionName: String = "", gradientFunc: String = "", unknownFields: UnknownFieldSet = ...) extends GeneratedMessage with Updatable[GradientDef] with Product with Serializable

    GradientDef defines the gradient function of a function defined in a function library.

    GradientDef defines the gradient function of a function defined in a function library.

    A gradient function g (specified by gradient_func) for a function f (specified by function_name) must follow the following:

    The function 'f' must be a numerical function which takes N inputs and produces M outputs. Its gradient function 'g', which is a function taking N + M inputs and produces N outputs.

    I.e. if we have (y1, y2, ..., y_M) = f(x1, x2, ..., x_N), then, g is (dL/dx1, dL/dx2, ..., dL/dx_N) = g(x1, x2, ..., x_N, dL/dy1, dL/dy2, ..., dL/dy_M), where L is a scalar-value function of (x1, x2, ..., xN) (e.g., the loss function). dL/dx_i is the partial derivative of L with respect to x_i.

    functionName

    The function name.

    gradientFunc

    The gradient function's name.

    Annotations
    @SerialVersionUID()

Value Members

  1. object FunctionDef extends GeneratedMessageCompanion[FunctionDef]
  2. object FunctionDefLibrary extends GeneratedMessageCompanion[FunctionDefLibrary]
  3. object FunctionProto extends GeneratedFileObject
  4. object GradientDef extends GeneratedMessageCompanion[GradientDef]

Ungrouped