

def std(x, axis=None, keepdims=False):
    'Standard deviation of a tensor, alongside the specificied axis.\n    '
    axis = _normalize_axis(axis, ndim(x))
    if (x.dtype.base_dtype == tf.bool):
        x = tf.cast(x, _FLOATX)
    m = tf.reduce_mean(x, reduction_indices=axis, keep_dims=True)
    devs_squared = tf.square((x - m))
    return tf.sqrt(tf.reduce_mean(devs_squared, reduction_indices=axis, keep_dims=keepdims))

dataset/ETHPy150Open fchollet/keras/keras/backend/tensorflow_backend.py std/original