Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port keras lookup layers to new adapt, use a StaticHashTable during call
This is a significant refactor of the internals of the layer, which will break SavedModel compatibility with previous versions. The usage of the layer will remain the same, so a compatible layer should be generatable from the same training script. This refactor has the following advantages: - Static tables can be distributed to end workers in a multi-worker setting allowing more efficient distributed training. - File based vocabularies will only be scanned once. - Static vocabularies passed on init will be consistently clonable with the layer config, rather than clonable only in the file based case. We now consistently enforce that a vocabulary must be set when calling the layer on anything besides a keras.Input. PiperOrigin-RevId: 380645230 Change-Id: I82f5e8dc77b48df409044ce88aca3582ac3658d1
- Loading branch information