Object

org.platanios.tensorflow.api.ops.lookup

Lookup

Related Doc: package lookup

Permalink

object Lookup extends Lookup

Linear Supertypes
Lookup, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Lookup
  2. Lookup
  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 clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. def indexTableFromFile(filename: String, delimiter: String = "\t", vocabularySize: Int = 1, defaultValue: Long = 1L, numOOVBuckets: Int = 0, hashSpecification: HashSpecification = FAST_HASH, keysDataType: types.DataType = STRING, name: String = "IndexTableFromFile"): LookupTable

    Permalink

    Creates a lookup table that converts string tensors into integer IDs.

    Creates a lookup table that converts string tensors into integer IDs.

    This operation constructs a lookup table to convert tensors of strings into tensors of INT64 IDs. The mapping is initialized from a vocabulary file specified in filename, where the whole line is the key and the zero-based line number is the ID.

    Any lookup of an out-of-vocabulary token will return a bucket ID based on its hash if numOOVBuckets is greater than zero. Otherwise it is assigned the defaultValue. The bucket ID range is: [vocabularySize, vocabularySize + numOOVBuckets - 1].

    The underlying table must be initialized by executing the tf.tablesInitializer() op or the op returned by table.initialize().

    Example usage:

    If we have a vocabulary file "test.txt" with the following content:

    emerson
    lake
    palmer

    Then, we can use the following code to create a table mapping "emerson" -> 0, "lake" -> 1, and "palmer" -> 2:

    val table = tf.indexTableFromFile("test.txt"))
    filename

    Filename of the text file to be used for initialization. The path must be accessible from wherever the graph is initialized (e.g., trainer or evaluation workers).

    delimiter

    Delimiter to use in case a TextFileColumn extractor is being used.

    vocabularySize

    Number of elements in the file, if known. If not known, set to -1 (the default value).

    defaultValue

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

    numOOVBuckets

    Number of out-of-vocabulary buckets.

    hashSpecification

    Hashing function specification to use.

    keysDataType

    Data type of the table keys.

    name

    Name for the created table.

    returns

    Created table.

    Definition Classes
    Lookup
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. def lookupInitializers: Set[Op]

    Permalink

    Returns the set of all lookup table initializers that have been created in the current graph.

    Returns the set of all lookup table initializers that have been created in the current graph.

    Definition Classes
    Lookup
  14. def lookupsInitializer(name: String = "LookupsInitializer"): Op

    Permalink

    Returns an initializer op for all lookup table initializers that have been created in the current graph.

    Returns an initializer op for all lookup table initializers that have been created in the current graph.

    Definition Classes
    Lookup
  15. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  19. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit

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

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

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

Inherited from Lookup

Inherited from AnyRef

Inherited from Any

Ungrouped