We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
` encoder_inputs = keras.layers.Input(shape=(None,), dtype='int64', name='english') encoder_embed_outs = PositionalEmbedding(SEQ_LEN, MAX_VOCAB, EMBED_DIM)(encoder_inputs) encoder_transformer_outs = TransformerEncoder(num_heads=8, embed_dim=EMBED_DIM, dense_dim=2048)(encoder_embed_outs)
#encoder_transformer_outs == (None, 80, 256) decoder_inputs = keras.layers.Input(shape=(None,), dtype='int64', name='spanish')
decoder_embed_outs = PositionalEmbedding(SEQ_LEN, MAX_VOCAB, EMBED_DIM)(decoder_inputs) #decoder_embed_outs == (None, 80, 256)
decoder_transformer_outs = TransformerDecoder(num_heads=8, embed_dim=EMBED_DIM, dense_dim=2048)(decoder_embed_outs, encoder_transformer_outs) decoder_dropout_outs = keras.layers.Dropout(0.5)(decoder_transformer_outs)
decoder_outputs = keras.layers.Dense(MAX_VOCAB, activation='softmax')(decoder_dropout_outs)
transformer_model = keras.Model(inputs=[encoder_inputs, decoder_inputs], outputs=decoder_outputs) transformer_model.summary()
after model.fit, transformer_model.save('model/eng_spa_transformer') new_model = keras.models.load_model('model/eng_spa_transformer', custom_objects={'TransformerDecoder': TransformerDecoder, 'TransformerEncoder':TransformerEncoder, 'PositionalEmbedding':PositionalEmbedding.from_config(config)})
transformer_model.save('model/eng_spa_transformer') new_model = keras.models.load_model('model/eng_spa_transformer', custom_objects={'TransformerDecoder': TransformerDecoder, 'TransformerEncoder':TransformerEncoder, 'PositionalEmbedding':PositionalEmbedding.from_config(config)})
However, new_model is loaded however, not predicts well.. I think the problem is that the asserts file in saved directory is empty..
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
`
encoder_inputs = keras.layers.Input(shape=(None,), dtype='int64', name='english')
encoder_embed_outs = PositionalEmbedding(SEQ_LEN, MAX_VOCAB, EMBED_DIM)(encoder_inputs)
encoder_transformer_outs = TransformerEncoder(num_heads=8, embed_dim=EMBED_DIM, dense_dim=2048)(encoder_embed_outs)
#encoder_transformer_outs == (None, 80, 256)
decoder_inputs = keras.layers.Input(shape=(None,), dtype='int64', name='spanish')
decoder_embed_outs = PositionalEmbedding(SEQ_LEN, MAX_VOCAB, EMBED_DIM)(decoder_inputs)
#decoder_embed_outs == (None, 80, 256)
decoder_transformer_outs = TransformerDecoder(num_heads=8, embed_dim=EMBED_DIM, dense_dim=2048)(decoder_embed_outs, encoder_transformer_outs)
decoder_dropout_outs = keras.layers.Dropout(0.5)(decoder_transformer_outs)
decoder_outputs = keras.layers.Dense(MAX_VOCAB, activation='softmax')(decoder_dropout_outs)
transformer_model = keras.Model(inputs=[encoder_inputs, decoder_inputs], outputs=decoder_outputs)
transformer_model.summary()
after model.fit,
transformer_model.save('model/eng_spa_transformer') new_model = keras.models.load_model('model/eng_spa_transformer', custom_objects={'TransformerDecoder': TransformerDecoder, 'TransformerEncoder':TransformerEncoder, 'PositionalEmbedding':PositionalEmbedding.from_config(config)})
However, new_model is loaded however, not predicts well..
I think the problem is that the asserts file in saved directory is empty..
The text was updated successfully, but these errors were encountered: