lesson 9/11

This commit is contained in:
elvis
2023-11-17 12:42:12 +01:00
parent 9e7f427faa
commit 7afb1372f8
23 changed files with 7604 additions and 0 deletions

View 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