deepr.layers.LookupFromMapping
- class deepr.layers.LookupFromMapping(table_name, mapping, default_value=None, key_dtype=None, value_dtype=None, reuse=False, **kwargs)[source]
Lookup From Mapping Layer.
- default_value
Default value for missing keys
- Type:
Any
- key_dtype
Keys type
- Type:
tf.DType
- mapping
Mapping keys -> index
- Type:
Dict[Any, Any]
- value_dtype
Values type
- Type:
tf.DType
- __init__(table_name, mapping, default_value=None, key_dtype=None, value_dtype=None, reuse=False, **kwargs)[source]
Methods
__init__
(table_name, mapping[, ...])forward
(tensors[, mode])Forward method of the layer
forward_as_dict
(tensors[, mode])Forward method on a dictionary of Tensors.