import tensorflow as tf



def pointer(inputs, state, hidden, mask, scope="pointer"):
    with tf.variable_scope(scope):
        u = tf.concat([tf.tile(tf.expand_dims(state, axis=1), [1, tf.shape(inputs)[1], 1]), inputs], axis=2)  #[N,PL,2d]
        s0 = tf.nn.tanh(dense(u, hidden, use_bias=False, scope="s0"))
