Skip to content

Instantly share code, notes, and snippets.

@mtrudelle
Created September 6, 2019 12:51
Show Gist options
  • Save mtrudelle/87e1f43d2c2f1c3f2603ab1e05d2b0b8 to your computer and use it in GitHub Desktop.
Save mtrudelle/87e1f43d2c2f1c3f2603ab1e05d2b0b8 to your computer and use it in GitHub Desktop.
Sigmoid Function using "exp(-y)" does not work
% Why does this Sigmoid function using exp(-y) where y is a [100 1] vector does not work?
octave:70> size(y)
ans =
100 1
octave:71> y=zeros([100,1]);
octave:72> g=1/(1+exp(-y))
g =
Columns 1 through 16:
0.0050000 0.0050000 0.0050000 0.0050000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment