Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. def train(self, X, Y):
  2.  
  3. self.X = X
  4. self.Y = Y
  5.  
  6. self.J = []
  7.  
  8. params0 = self.N.getParams()
  9.  
  10. options = {'maxiter':1, 'disp': True}
  11.  
  12. _res = optimize.minimize(self.costFunctionWrapper, params0, jac=True,
  13. method='BFGS', args = (X, Y),
  14. options=options, callback = self.callbackF)
  15. self.N.setParams(_res.x)
  16. self.optimizationResults = _res
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement