Mercurial > pylearn
comparison doc/v2_planning/api_optimization.txt @ 1102:e7c52923f122
api_optimization: Couple replies
author | Olivier Delalleau <delallea@iro> |
---|---|
date | Mon, 13 Sep 2010 15:03:40 -0400 |
parents | 153cf820a975 |
children | c5c7ba805a2f |
comparison
equal
deleted
inserted
replaced
1101:b422cbaddc52 | 1102:e7c52923f122 |
---|---|
112 OD asks: Could it be more convenient for x0 to be a list? | 112 OD asks: Could it be more convenient for x0 to be a list? |
113 | 113 |
114 JB replies: Yes, but that's not the interface used by other minimize() | 114 JB replies: Yes, but that's not the interface used by other minimize() |
115 routines (e.g. in scipy). Maybe another list-based interface is required? | 115 routines (e.g. in scipy). Maybe another list-based interface is required? |
116 | 116 |
117 OD replies: I think most people would prefer to use a list-based interface, so | |
118 they don't have to manually pack / unpack multiple arrrays of parameters. So I | |
119 would vote in favor or having both (where the main reason to also provide a | |
120 non-list interface would be to allow one to easily switch e.g. to scipy's | |
121 minimize). | |
122 I would guess the reason scipy's interface is like this is because it makes | |
123 it easier for the optimization algorithm, and the packing / unpacking is | |
124 typically done only once for non-iterative algorithms. However, the first | |
125 point does not matter if we are just wrapping a theano-based algorithm that | |
126 already has to handle multiple parameters (and the second may not hold if | |
127 we allow iterative algorithms). | |
117 | 128 |
118 OD asks: Why make a difference between iterative and one-shot versions? A one-shot | 129 OD asks: Why make a difference between iterative and one-shot versions? A one-shot |
119 algorithm can be seen as an iterative one that stops after its first | 130 algorithm can be seen as an iterative one that stops after its first |
120 iteration. The difference I see between the two interfaces proposed here | 131 iteration. The difference I see between the two interfaces proposed here |
121 is mostly that one relies on Theano while the other one does not, but | 132 is mostly that one relies on Theano while the other one does not, but |
125 JB replies: Right, it would make more sense to distinguish them by the fact that | 136 JB replies: Right, it would make more sense to distinguish them by the fact that |
126 one works on Theano objects, and the other on general Python callable functions. | 137 one works on Theano objects, and the other on general Python callable functions. |
127 There is room for an iterative numpy interface, but I didn't make it yet. Would | 138 There is room for an iterative numpy interface, but I didn't make it yet. Would |
128 that answer your question? | 139 that answer your question? |
129 | 140 |
130 | 141 OD replies and asks: Partly. Do we really need a non-iterative interface? |
131 | 142 |
132 Examples | 143 Examples |
133 -------- | 144 -------- |
134 | 145 |
135 | 146 |