import tensorflow as tf

        if options.pointer_gen:
            with tf.variable_scope('calculate_pgen'):
                p_gen = linear([context_t, state_t.c, state_t.h, x], 1, True) # [batch_size, 1]
                p_gen = tf.sigmoid(p_gen)

        # Concatenate the cell_output (= decoder state) and the context vector, and pass them through a linear layer
