Created
March 23, 2019 12:35
-
-
Save shubham0204/52866fcc2e5416e7e8d72ad60628cc51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def make_inference_models(): | |
encoder_model = tf.keras.models.Model(encoder_inputs, encoder_states) | |
decoder_state_input_h = tf.keras.layers.Input(shape=( 200 ,)) | |
decoder_state_input_c = tf.keras.layers.Input(shape=( 200 ,)) | |
decoder_states_inputs = [decoder_state_input_h, decoder_state_input_c] | |
decoder_outputs, state_h, state_c = decoder_lstm( | |
decoder_embedding , initial_state=decoder_states_inputs) | |
decoder_states = [state_h, state_c] | |
decoder_outputs = decoder_dense(decoder_outputs) | |
decoder_model = tf.keras.models.Model( | |
[decoder_inputs] + decoder_states_inputs, | |
[decoder_outputs] + decoder_states) | |
return encoder_model , decoder_model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment