Created
October 5, 2020 23:42
-
-
Save SherazKhan/b926149f80e15ead49698f9b91f71358 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
def rectified(x): | |
return max(0.0, x) | |
X = np.arange(-100, 100) | |
y = np.array([rectified(x) for x in X]) | |
for index in range(1, 10): | |
yy = y ** index | |
yy /= yy.max() | |
plt.plot(X, yy, label=str(index)) | |
plt.legend() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment