I'm working through the Keras example for a sequence to sequence model.
https://github.com/keras-team/keras/blob/master/examples/lstm_seq2seq.py
In this example, they build a model from an input tensor.
encoder_inputs = Input(shape=(None, num_encoder_tokens))
model = Model([encoder_inputs, decoder_inputs], decoder_outputs)
print(encoder_inputs)
output:
Tensor("input_1:0", shape=(?, ?, 71), dtype=float32)
Once a model is built, is there a way to retrieve the input tensor from the model? Something along the lines of
encoder_inputs = model.layers[0].??????
Yes, this is simply model.input
or model.inputs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With