import tensorflow as tf

                "char_mat", initializer=tf.constant(char_mat, dtype=tf.float32))

            self.c_mask = tf.cast(self.c, tf.bool)
            self.q_mask = tf.cast(self.q, tf.bool)
            self.c_len = tf.reduce_sum(tf.cast(self.c_mask, tf.int32), axis=1)
            self.q_len = tf.reduce_sum(tf.cast(self.q_mask, tf.int32), axis=1)

            if opt:
                # we have to hardcode the max batch size here! use the batch size from the generator as this will be used for PG
                N, CL = config.batch_size if not self.demo else config.batch_size, config.char_limit
