I am trying to understand some code implemented using the tensorflow framework on jupyter notebook, when I get the following error on running this cell. I do not understand the problem here and some clarification would be very helpful.
For reference, a training decoding layer is being created here in tensorflow.
def decoding_layer_train(encoder_state, dec_cell, dec_embed_input,
Create a decoding layer for training:param encoder_state: Encoder State:param dec_cell: Decoder RNN Cell:param dec_embed_input: Decoder embedded input:param target_sequence_length: The lengths of each sequence in the target batch:param max_summary_length: The length of the longest sequence in the batch:param output_layer: Function to apply the output layer:param keep_prob: Dropout keep probability:return: BasicDecoderOutput containing training logits and sample_id
# TODO: Implement Function
# Helper for the training process; used by Basic Decoder to read inputs
training_helper = tf.contrib.seq2seq.TrainingHelper(inputs=dec_embed_input,
# Basic decoder
training_decoder = tf.contrib.seq2seq.BasicDecoder(dec_cell,
# Performs dynamic decoding using the decoder
training_decoder_output, final_state, final_sequence_lengths = tf.contrib.seq2seq.dynamic_decode(training_decoder,
DON’T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
tests.test_decoding_layer_train(decoding_layer_train)enter code here
Error message (Screenshot):
Figured it out. I was using tensorflow 1.1, just had to change that to 1.2 and everything worked 🙂