def mean(x, axis=None, keepdims=False):
    '''Mean of a tensor, alongside the specificied axis.
    '''
    axis = _normalize_axis(axis, ndim(x))
    if x.dtype.base_dtype == tf.bool:
        x = tf.cast(x, _FLOATX)
    return tf.reduce_mean(x, reduction_indices=axis, keep_dims=keepdims)
dataset/ETHPy150Open fchollet/keras/keras/backend/tensorflow_backend.py/mean/original