Class

org.platanios.tensorflow.api.ops.variables

VariableScope

Related Doc: package variables

Permalink

case class VariableScope extends Product with Serializable

Variable scope that carries default settings to provide to getVariable.

A variable scope allows to create new variables and to share already created ones while providing checks to not create or share by accident.

Many of the arguments we need for getVariable in a variable store are most easily handled with a context. VariableScope objects are used for the defaults.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. VariableScope
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. 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. val cachingDevice: (OpSpecification) ⇒ String

    Permalink

    Default caching device passed to getVariable.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val dataType: types.DataType

    Permalink

    Default data type passed to getVariable.

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def getPartitionedVariable(store: VariableStore, name: String, dataType: types.DataType = this.dataType, shape: core.Shape = null, initializer: Initializer = this.initializer, regularizer: Regularizer = this.regularizer, partitioner: Partitioner = this.partitioner, trainable: Boolean = true, reuse: Reuse = this.reuse, collections: Set[Key[Variable]] = Set.empty, cachingDevice: (OpSpecification) ⇒ String = this.cachingDevice): PartitionedVariable

    Permalink

    Gets an existing partitioned variable with the specified name or creates a new one.

    Gets an existing partitioned variable with the specified name or creates a new one.

    store

    Variable store currently being used to store variables.

    name

    Variable name.

    dataType

    Variable data type.

    shape

    Variable shape.

    initializer

    Variable initializer. If initializer is null (the default), the default initializer passed in the constructor is used. If that one is null too, then we use a new glorotUniformInitializer. The initializer will be called for each part of the partitioned variable separately.

    regularizer

    Variable regularizer.

    partitioner

    Function that accepts a fully defined Shape and returns a sequence of integers (i.e., the partitions). These integers describe how to partition the given variable, along the each dimension. That is, partitions(1) = 3 means that we split the variable into 3 parts along dimension 1. Currently, partitioning along only a single axis is supported.

    trainable

    If true, the default, the variable is added to the graph collection Graph.Keys.TRAINABLE_VARIABLES. This collection is used as the default set of variables to use by the optimizers.

    reuse

    Reuse value indicating whether to re-use an existing variable with the same name, create a new variable, or do either.

    collections

    Set of graph collections keys. The variable is added to these collections. Defaults to Set(Graph.Keys.GLOBAL_VARIABLES).

    cachingDevice

    Device specification describing where the variable should be cached for reading. Defaults to the variable's device. Typical use is to cache on the device where the ops using the variable reside, to deduplicate copying through Switch and other conditional statements.

    returns

    Requested variable.

    Annotations
    @throws( ... ) @throws( ... ) @throws( ... )
    Exceptions thrown

    IllegalArgumentException If any of the provided arguments are not compatible with each other, or with the variables stored in this variable store.

    InvalidDataTypeException If the provided data type does not match the data type of the corresponding variable stored in this variable store (if there exists one).

    ShapeMismatchException If the provided shape does not match the shape of the corresponding variable stored in this variable store (if there exists one).

  12. def getVariable(store: VariableStore, name: String, dataType: types.DataType = this.dataType, shape: core.Shape = null, initializer: Initializer = this.initializer, regularizer: Regularizer = this.regularizer, trainable: Boolean = true, reuse: Reuse = this.reuse, collections: Set[Key[Variable]] = Set.empty, cachingDevice: (OpSpecification) ⇒ String = this.cachingDevice): Variable

    Permalink

    Gets an existing variable with the specified name or creates a new one.

    Gets an existing variable with the specified name or creates a new one.

    store

    Variable store currently being used to store variables.

    name

    Variable name.

    dataType

    Variable data type.

    shape

    Variable shape.

    initializer

    Variable initializer. If initializer is null (the default), the default initializer passed in the constructor is used. If that one is null too, then we use a new glorotUniformInitializer. The initializer will be called for each part of the partitioned variable separately.

    regularizer

    Variable regularizer.

    trainable

    If true, the default, the variable is added to the graph collection Graph.Keys.TRAINABLE_VARIABLES. This collection is used as the default set of variables to use by the optimizers.

    reuse

    Reuse value indicating whether to re-use an existing variable with the same name, create a new variable, or do either.

    • If reuse is null (the default), both new and existing variables are returned.
    collections

    Set of graph collections keys. The variable is added to these collections. Defaults to Set(Graph.Keys.GLOBAL_VARIABLES).

    cachingDevice

    Device specification describing where the variable should be cached for reading. Defaults to the variable's device. Typical use is to cache on the device where the ops using the variable reside, to deduplicate copying through Switch and other conditional statements.

    returns

    Requested variable.

    Annotations
    @throws( ... ) @throws( ... ) @throws( ... )
    Exceptions thrown

    IllegalArgumentException If any of the provided arguments are not compatible with each other, or with the variables stored in this variable store.

    InvalidDataTypeException If the provided data type does not match the data type of the corresponding variable stored in this variable store (if there exists one).

    ShapeMismatchException If the provided shape does not match the shape of the corresponding variable stored in this variable store (if there exists one).

  13. val initializer: Initializer

    Permalink

    Default initializer passed to getVariable.

  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. val name: String

    Permalink

    Name of the variable scope, used as a prefix in getVariable.

  16. val nameScope: String

    Permalink

    Default name scope passed to getVariable.

  17. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  20. val partitioner: Partitioner

    Permalink

    Default partitioner passed to getVariable.

  21. val regularizer: Regularizer

    Permalink

    Default regularizer passed to getVariable.

  22. val reuse: Reuse

    Permalink

    Reuse value indicating whether to re-use an existing variable with the same name, create a new variable, or do either.

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

    Permalink
    Definition Classes
    AnyRef
  24. val underlyingGetter: VariableGetter

    Permalink

    Default underlying variable getter passed to getVariable.

  25. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped