Incompatible shapes when loading model with TextVectorization and Embedding + Conv1D #38250
Labels
comp:keras
Keras related issues
stat:awaiting tensorflower
Status - Awaiting response from tensorflower
TF 2.3
Issues related to TF 2.3
type:bug
Bug
There is ValueError: Shapes incompatible when trying to load_model with TextVectorization and Embedding + Conv1D (or LSTM or GRU).
It can be easily replicated using TextVectorization layer examples from TF documentation. You just need to add model save & load to Using the TextVectorization layer in an Embedding + Conv1D model sample.
I created copy of TextVectorization layer examples colab with these errors. Code added to original example:
Error from load_model execution:
This error do NOT occur when trying to do save & load in example: Using the TextVectorization layer in a bigram TF-IDF densely-connected model. This example contains only Dense and Dropout layers and do not contain Embedding and Conv1D.
I also found same problem for my custom models using LSTM and GRU.
Problem occurred for nightly TF version
2.2.0-dev20200405
The text was updated successfully, but these errors were encountered: