Currently the functionality exists but it is rather convoluted to use
|
blp_cache = L2ODLL.build_cache(m, L2ODLL.BoundDecomposition(m)); |
|
blp_y_pred = randn_like(L2ODLL.get_y(blp_cache)); |
|
dobj1 = blp_cache.dll_layer(blp_y_pred, param_value) |
|
dobj, dobj_wrt_y = DifferentiationInterface.value_and_gradient( |
|
(y,p) ->blp_cache.dll_layer(L2ODLL.unflatten_y(y, L2ODLL.y_shape(blp_cache)),p), |
|
DifferentiationInterface.AutoForwardDiff(), |
|
L2ODLL.flatten_y(blp_y_pred), DifferentiationInterface.Constant(param_value) |
|
) |
|
dobj_wrt_y = L2ODLL.unflatten_y(dobj_wrt_y, L2ODLL.y_shape(blp_cache)) |
Currently the functionality exists but it is rather convoluted to use
L2ODLL.jl/test/runtests.jl
Lines 92 to 100 in fe32671