deepr.layers.LookupFromFile

class deepr.layers.LookupFromFile(table_name, path, key_dtype=None, reuse=False, **kwargs)[source]

Lookup From File Layer.

Creates a table at runtime from a mapping file. The table will map each key to its corresponding line index as an tf.int64.

key_dtype

Keys type

Type:

tf.DType

path

Path to mapping file

Type:

str

reuse

If True, reuse table with the same name

Type:

bool

table_name

Name of the HashTable

Type:

str

__init__(table_name, path, key_dtype=None, reuse=False, **kwargs)[source]

Methods

__init__(table_name, path[, key_dtype, reuse])

forward(tensors[, mode])

Forward method of the layer

forward_as_dict(tensors[, mode])

Forward method on a dictionary of Tensors.