def slp(x, logits):
    n = functools.reduce(operator.mul, [int(d) for d in x.shape[1:]], 1)
    output = tf.layers.dense(inputs=tf.reshape(x, [(- 1), n]), units=logits)
    return (output, tf.argmax(output, axis=1))
def slp(x, logits):
    n = functools.reduce(operator.mul, [int(d) for d in x.shape[1:]], 1)
    output = tf.layers.dense(inputs=tf.reshape(x, [(- 1), n]), units=logits)
    return (output, tf.argmax(output, axis=1))