Skip to content

Cannot load the last model (model_5) in the Milestone project 2 Skimlit #170

Answered by mrdbourke
BaoLocPham asked this question in Q&A
Discussion options

You must be logged in to vote

I've found a fix!

It looks like the masking was an issue indeed.

This error:

The mask that was passed in was tf.RaggedTensor(values=Tensor("Placeholder_2:0", shape=(None,), dtype=bool), row_splits=Tensor("Placeholder_3:0", shape=(None,), dtype=int64)) and cannot be applied to RaggedTensor inputs. Please make sure that there is no mask passed in by upstream layers.

Turns out the masking happened in the char_embed creation code:

# Create char embedding layer (OLD)
char_embed = layers.Embedding(input_dim=NUM_CHAR_TOKENS, # number of different characters
                              output_dim=25, # embedding dimension of each character (same as Figure 1 in https://arxiv.org/pdf/1612.05251.…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@mrdbourke
Comment options

Comment options

You must be logged in to vote
2 replies
@BaoLocPham
Comment options

@rkrish999
Comment options

Answer selected by BaoLocPham
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants