# HG changeset patch # User Olivier Delalleau # Date 1284436504 14400 # Node ID c5c7ba805a2f3173829ee2bfe2064d42e9be2e26 # Parent e5306f5626d4c7e01b355b1ed87edadefd63b5ac api_optimization: Edited comment - Unpacking is actually needed on each call to f/df diff -r e5306f5626d4 -r c5c7ba805a2f doc/v2_planning/api_optimization.txt --- a/doc/v2_planning/api_optimization.txt Mon Sep 13 22:45:10 2010 -0400 +++ b/doc/v2_planning/api_optimization.txt Mon Sep 13 23:55:04 2010 -0400 @@ -120,11 +120,10 @@ non-list interface would be to allow one to easily switch e.g. to scipy's minimize). I would guess the reason scipy's interface is like this is because it makes - it easier for the optimization algorithm, and the packing / unpacking is - typically done only once for non-iterative algorithms. However, the first - point does not matter if we are just wrapping a theano-based algorithm that - already has to handle multiple parameters (and the second may not hold if - we allow iterative algorithms). + it easier for the optimization algorithm. However, this does not really + matter if we are just wrapping a theano-based algorithm (that already has + to handle multiple parameters), and avoiding useless data copies on each call + to f / df can only help speed-wise. OD asks: Why make a difference between iterative and one-shot versions? A one-shot algorithm can be seen as an iterative one that stops after its first