Skip to content

Commit

Permalink
fix a bug in test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Boltzmann authored and Boltzmann committed Jul 5, 2019
1 parent 83d5ce7 commit 91155f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neural_nets/activations/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def plot_activations():
fig, axes = plt.subplots(2, 3, sharex=True, sharey=True)
fns = [Affine(), Tanh(), Sigmoid(), ReLU(), LeakyReLU()]
for ax, fn in zip(axes.flatten(), fns):
X = np.linspace(-3, 3, 100).astype(float)
X = np.linspace(-3, 3, 100).astype(float).reshape(100,1)
ax.plot(X, fn(X), label=r"$y$", alpha=0.7)
ax.plot(X, fn.grad(X), label=r"$\frac{dy}{dx}$", alpha=0.7)
ax.plot(X, fn.grad2(X), label=r"$\frac{d^2 y}{dx^2}$", alpha=0.7)
Expand Down

0 comments on commit 91155f6

Please sign in to comment.