Last active
September 16, 2017 13:44
-
-
Save joelthchao/929e59bc91b9fec7c9625eab8b5b88e3 to your computer and use it in GitHub Desktop.
Dead neuron
This file contains hidden or 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 | |
# x: 4-dim zero mean random | |
# y: sign of x's mean | |
x = np.random.rand(320, 4) - 0.5 | |
y = np.zeros((320, 1)) | |
for i in range(x.shape[0]): | |
y[i] = int(np.mean(x[i, :]) > 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment