Easiest way to test SFO with theano based models is to unpack the theta dict in f_df, and update the values of each parameter in the SdA, evaluate the cost and gradient, return.