Class

org.platanios.tensorflow.api.ops.lookup

HashTable

Related Doc: package lookup

Permalink

case class HashTable(initializer: LookupTableInitializer, defaultValue: Output, container: String = "", sharedName: String = "", useNodeNameSharing: Boolean = false, name: String = "HashTable") extends InitializableLookupTable with Product with Serializable

Generic hash table implementation for lookup tables.

The constructor creates a hash table, specifying the type of its keys and values. Before using the table the caller will have to initialize it. After initialization the table will be immutable.

Example usage:

val table = HashTable(LookupTableTensorInitializer(keys, values), -1)
val output = table.lookup(input)
// Can now run evaluate the `output` tensor after executing the table initializer.
initializer

Lookup table initializer to use.

defaultValue

Default value to use if a key is missing from the table.

container

If non-empty, the created table is placed in the given container. Otherwise, a default container is used.

sharedName

If non-empty, the created table is named in the given bucket with this shared name. Otherwise, the op name is used, instead.

useNodeNameSharing

If set to true and sharedName is empty, the table is shared using the node name.

name

Name for the created table.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HashTable
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. InitializableLookupTable
  7. LookupTable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HashTable(initializer: LookupTableInitializer, defaultValue: Output, container: String = "", sharedName: String = "", useNodeNameSharing: Boolean = false, name: String = "HashTable")

    Permalink

    initializer

    Lookup table initializer to use.

    defaultValue

    Default value to use if a key is missing from the table.

    container

    If non-empty, the created table is placed in the given container. Otherwise, a default container is used.

    sharedName

    If non-empty, the created table is named in the given bucket with this shared name. Otherwise, the op name is used, instead.

    useNodeNameSharing

    If set to true and sharedName is empty, the table is shared using the node name.

    name

    Name for the created table.

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 checkDataTypes(keysDataType: types.DataType, valuesDataType: types.DataType): Unit

    Permalink

    Checks that the provided keys and values data types match those expected for this lookup table and throws an InvalidDataTypeException if they do not.

    Checks that the provided keys and values data types match those expected for this lookup table and throws an InvalidDataTypeException if they do not.

    keysDataType

    Provided keys data type to check.

    valuesDataType

    Provided values data type to check.

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

    InvalidDataTypeException If any of the provided data type does not match the corresponding expected type.

  6. def clone(): AnyRef

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

    Permalink

    If non-empty, the created table is placed in the given container.

    If non-empty, the created table is placed in the given container. Otherwise, a default container is used.

  8. val defaultValue: Output

    Permalink

    Default value to use if a key is missing from the table.

    Default value to use if a key is missing from the table.

    Definition Classes
    HashTableInitializableLookupTable
  9. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. val handle: Output

    Permalink

    Resource handle to a lookup table.

    Resource handle to a lookup table.

    Definition Classes
    InitializableLookupTable
  13. def initialize(name: String = "Initialize"): Op

    Permalink

    Creates and returns an op used to initialize this table.

    Creates and returns an op used to initialize this table.

    name

    Name for the created op.

    returns

    Created op.

    Definition Classes
    InitializableLookupTableLookupTable
  14. val initializer: LookupTableInitializer

    Permalink

    Lookup table initializer to use.

    Lookup table initializer to use.

    Attributes
    protected
    Definition Classes
    HashTableInitializableLookupTable
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. val keysDataType: types.DataType

    Permalink

    Data type of the table keys.

    Data type of the table keys.

    Definition Classes
    LookupTable
  17. def lookup[T <: OutputLike](keys: T, name: String = "Lookup")(implicit arg0: OutputOps[T]): T

    Permalink

    Creates an op that looks up the provided keys in this table and returns the corresponding values.

    Creates an op that looks up the provided keys in this table and returns the corresponding values.

    keys

    Tensor containing the keys to look up.

    name

    Name for the created op.

    returns

    Created op output.

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

    InvalidDataTypeException If the provided keys data types does not match the keys data type of this table.

  18. val name: String

    Permalink

    Name for the created table.

    Name for the created table.

    Definition Classes
    HashTableLookupTable
  19. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  22. val sharedName: String

    Permalink

    If non-empty, the created table is named in the given bucket with this shared name.

    If non-empty, the created table is named in the given bucket with this shared name. Otherwise, the op name is used, instead.

  23. def size(name: String = "Size"): Output

    Permalink

    Creates an op that computes the number of elements in this table.

    Creates an op that computes the number of elements in this table.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    InitializableLookupTableLookupTable
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. val useNodeNameSharing: Boolean

    Permalink

    If set to true and sharedName is empty, the table is shared using the node name.

  26. val valuesDataType: types.DataType

    Permalink

    Data type of the table values.

    Data type of the table values.

    Definition Classes
    LookupTable
  27. final def wait(): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. 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 InitializableLookupTable

Inherited from LookupTable

Inherited from AnyRef

Inherited from Any

Ungrouped