<jupyter_start><jupyter_text>activation function -- relu<jupyter_code># define function
def relu(X):
   return np.maximum(0,X)
# prepare data
import numpy as np
import matplotlib.pyplot as plt
input = np.linspace(-100,100)
output = relu(input)
# plot
plt.plot(input, output)
plt.xlabel("relu inputs")
plt.ylabel("relu inputs")
plt.savefig('relu.png')
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14066496163682865, 'fraction_numerical': 0.017902813299232736, 'mean_word_length': 6.538461538461538, 'pattern_counts': {'":': 0, '<': 5, '<?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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '539307', 'license': 'MIT', 'n_tokens_mistral': 160, 'n_tokens_neox': 150, 'n_words': 32, 'path': 'relu.ipynb', 'repo_name': 'janewen134/softmax-in-py', 'size': '391'}