You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that PR #266 looks nearly complete, I'm hoping we can revisit issue #156 and a few other additions or changes I've been thinking about. I know @johnmyleswhite mentioned that he would like to change the API in the past (not sure if that was meant in a broader sense or not).
Minor / Low Priority:
As I brought up in switch argument order for gradient and hessian evaluations? #156 - I think it would be nice to switch the order of the arguments so that fg!(x, storage) becomes fg!(storage, x) (making the mutated argument come first seems more consistent with Julian conventions and autodiff packages).
I kind of like changing the names to OnceDifferentiable and TwiceDifferentiable for brevity (and clarity in the case of DifferentiableFunction which is a bit ambiguous). This could be handled with a depwarn, but maybe isn't worth it. We could also consider merging these into a single type (see some options below)
Higher Priority:
DifferentiableFunction and TwiceDifferentiableFunction should know about each other somehow. Some ideas:
abstract AbstractDifferientiable
type OnceDifferentiable <:AbstractDifferentable...end
type TwiceDifferentiable <:AbstractDifferentiable...end
# Merge OnceDifferentiable and TwiceDifferentiable ?# This could be a problem for dispatching on one vs the other. But there are tricks to fix it.
type Differentiable
f::Function
g!::Function
fg!::Function
h!::Functionend# Constructor for a once differentiable function Differentiable(f, g!, fg!) =Differentiable(f, g!, fg!, (x,s)->error("Not implemented") )
Specifying a differentiable function with autodiff options. The autodiff packages in Julia are coming along and I'd like the ability to do something along these lines:
f(x) =...# my objective functionDifferentiableFunction(f, method=:autograd) # uses AutoGrad.jlDifferentiableFunction(f, method=:forward) # uses ForwardDiff.jlDifferentiableFunction(f, method=:central_diff) # uses finite central differencing
I'm not attached to using symbols - we could also dispatch on types if that is preferred.
The text was updated successfully, but these errors were encountered:
Now that PR #266 looks nearly complete, I'm hoping we can revisit issue #156 and a few other additions or changes I've been thinking about. I know @johnmyleswhite mentioned that he would like to change the API in the past (not sure if that was meant in a broader sense or not).
Minor / Low Priority:
fg!(x, storage)
becomesfg!(storage, x)
(making the mutated argument come first seems more consistent with Julian conventions and autodiff packages).OnceDifferentiable
andTwiceDifferentiable
for brevity (and clarity in the case ofDifferentiableFunction
which is a bit ambiguous). This could be handled with a depwarn, but maybe isn't worth it. We could also consider merging these into a single type (see some options below)Higher Priority:
DifferentiableFunction
andTwiceDifferentiableFunction
should know about each other somehow. Some ideas:I'm not attached to using symbols - we could also dispatch on types if that is preferred.
The text was updated successfully, but these errors were encountered: