Added Project and Report
This commit is contained in:
26
Lessons/11-09/TestFunctions/testNN_Hes.jl
Normal file
26
Lessons/11-09/TestFunctions/testNN_Hes.jl
Normal file
@ -0,0 +1,26 @@
|
||||
# function [Grd,Fun] = testNN_Grd(w)
|
||||
#
|
||||
# Gradient wrapper file generated by ADiGator
|
||||
# ©2010-2014 Matthew J. Weinstein and Anil V. Rao
|
||||
# ADiGator may be obtained at https://sourceforge.net/projects/adigator/
|
||||
# Contact: mweinstein@ufl.edu
|
||||
# Bugs/suggestions may be reported to the sourceforge forums
|
||||
# DISCLAIMER
|
||||
# ADiGator is a general-purpose software distributed under the GNU General
|
||||
# Public License version 3.0. While the software is distributed with the
|
||||
# hope that it will be useful, both the software and generated code are
|
||||
# provided 'AS IS' with NO WARRANTIES OF ANY KIND and no merchantability
|
||||
# or fitness for any purpose or application.
|
||||
|
||||
function testNN_Hes(w)
|
||||
gator_w.f = w
|
||||
gator_w.dw = ones(76,1)
|
||||
v = testNN_ADiGatorHes(gator_w)
|
||||
xind1 = v.dwdw_location(:,1)
|
||||
xind2 = v.dwdw_location(:,2)
|
||||
Hes = zeros(76,76)
|
||||
Hes[(xind2-1)*76 + xind1] = v.dwdw
|
||||
Grd = reshape(v.dw,[1 76])
|
||||
Fun = v.f
|
||||
return (Hes, Grd, Fun)
|
||||
end
|
||||
Reference in New Issue
Block a user