import tensorflow as tf

        else:
            nfeats_conv = reduce(lambda x, y: x * y, [int(x) for x in cnn_output.get_shape()[-3:]])
        feats_conv = tf.reshape(cnn_output, [batch_size * rnn_nunroll, nfeats_conv])
        nfeats_tot = nfeats_conv + nfeats
        feats_all = tf.concat(1, [feats_conv, feats_other])
        print('feats_cnn: {}'.format(feats_conv.get_shape()))
        print('feats_all: {}'.format(feats_all.get_shape()))

        # Project to RNN size
        rnn_output = feats_all
        rnn_output_size = nfeats_tot
        if do_rnn:
            with tf.variable_scope('rnn_proj'):
                rnn_proj_w = tf.get_variable('W', [nfeats_tot, rnn_size], initializer=tf.uniform_unit_scaling_initializer(factor=1.0, dtype=dtype), dtype=dtype)
                rnn_proj_b = tf.get_variable('b', [rnn_size], initializer=tf.constant_initializer(0.0), dtype=dtype)

            rnn_inputs = tf.nn.bias_add(tf.matmul(feats_all, rnn_proj_w), rnn_proj_b)
            rnn_inputs = tf.reshape(rnn_inputs, [batch_size, rnn_nunroll, rnn_size])
            rnn_inputs = tf.split(rnn_inputs, rnn_nunroll, axis=1)
            rnn_inputs = [tf.squeeze(input_, [1]) for input_ in rnn_inputs]

            if rnn_cell_type == 'rnn':
                cell_fn = tf.nn.rnn_cell.BasicRNNCell
            elif rnn_cell_type == 'gru':
                cell_fn = tf.nn.rnn_cell.GRUCell
            elif rnn_cell_type == 'lstm':
