Skip to content

Commit

Permalink
Update pyrenn.py
Browse files Browse the repository at this point in the history
using np instead of numpy
  • Loading branch information
yabata authored May 23, 2017
1 parent d00ea51 commit 49e6608
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/pyrenn.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def train_LM(P,Y,net,k_max=100,E_stop=1e-10,dampfac=3.0,dampconst=10.0,\
#calculate scaled inverse hessian
try:
G = np.linalg.inv(JJ+dampfac*np.eye(net['N'])) #scaled inverse hessian
except numpy.linalg.LinAlgError:
except np.linalg.LinAlgError:
# Not invertible. Go small step in gradient direction
w_delta = 1.0/1e10 * g
else:
Expand Down Expand Up @@ -981,4 +981,4 @@ def loadNN(filename):
net['normY'] = normY
net['w'] = w

return net
return net

0 comments on commit 49e6608

Please sign in to comment.