Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for keras.layers.Embedding in _get_word_embedding_weight
This resolves: - An issue of input embeddings in `TFT5ModelTest.test_resize_token_embeddings` and `TFT5ModelTest.test_save_load_after_resize_token_embeddings` when `model.config.tie_word_embeddings` is set to `False`: ``` ValueError: Attempt to convert a value (<tf_keras.src.layers.core.embedding.Embedding object at 0x32b0747a0>) with an unsupported type (<class 'tf_keras.src.layers.core.embedding.Embedding'>) to a Tensor. ``` - An issue of input embeddings in `TFMistralModelTest.test_resize_token_embeddings` where resizing token embeddings caused the following error: ``` ValueError: Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor. ```
- Loading branch information