<commit_before>import autograd.numpy as np
from autograd.scipy.misc import logsumexp


def relu(x):
    """
    Rectified Linear Unit
    """
    return x * (x > 0)


def softmax(x, axis=0):
    """
    The softmax function normalizes everything to between 0 and 1.
    """
    return np.exp(x - logsumexp(x, axis=axis, keepdims=True))


def tanh(x):
    """
    tanh non-linearity
    """
    return np.tanh(x)<commit_msg>added logistic nonlinearity<commit_after>import autograd.numpy as np
from autograd.scipy.misc import logsumexp


def relu(x):
    """
    Rectified Linear Unit
    """
    return x * (x > 0)


def softmax(x, axis=0):
    """
    The softmax function normalizes everything to between 0 and 1.
    """
    return np.exp(x - logsumexp(x, axis=axis, keepdims=True))


def tanh(x):
    """
    tanh non-linearity
    """
    return np.tanh(x)


def logistic(x):
    """
    logistic nonlinearity
    """
    return np.log(1 / (1 + np.exp(x)))
{'fraction_non_alphanumeric': 0.13229166666666667, 'fraction_numerical': 0.010416666666666666, 'mean_word_length': 2.7248062015503876, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5684225', 'n_tokens_mistral': 364, 'n_tokens_neox': 343, 'n_words': 91}