import tensorflow as tf

                    inputs.append(inputs_)

                encoder_inputs_ = tf.concat(inputs, axis=2)
                # if encoder.convolution_activation.lower() == 'relu':
                encoder_inputs_ = tf.nn.relu(encoder_inputs_)

            if encoder.maxout_stride:
                if encoder.binary:
                    raise NotImplementedError

                stride = encoder.maxout_stride
                k = tf.to_int32(tf.ceil(time_steps / stride) * stride) - time_steps   # TODO: simpler
                pad = tf.zeros([batch_size, k, tf.shape(encoder_inputs_)[2]])
                encoder_inputs_ = tf.concat([encoder_inputs_, pad], axis=1)
                encoder_inputs_ = tf.nn.pool(encoder_inputs_, window_shape=[stride], pooling_type='MAX',
                                             padding='VALID', strides=[stride])
                encoder_input_length_ = tf.to_int32(tf.ceil(encoder_input_length_ / stride))

            if encoder.highway_layers:
                x = encoder_inputs_
                for j in range(encoder.highway_layers):
                    size = x.shape[2].value

                    with tf.variable_scope('highway_{}'.format(j + 1)):
                        g = tf.layers.dense(x, size, activation=tf.nn.sigmoid, use_bias=True, name='g')
                        y = tf.layers.dense(x, size, activation=tf.nn.relu, use_bias=True, name='y')
                        x = g * y + (1 - g) * x

