Mercurial > pylearn
comparison doc/v2_planning/datalearn.txt @ 1369:f3a549bd8688
datalearn: Added another comment on James' numeric iterator function
author | Olivier Delalleau <delallea@iro> |
---|---|
date | Mon, 15 Nov 2010 15:20:49 -0500 |
parents | ad53f73020c2 |
children | 5785cbac3361 |
comparison
equal
deleted
inserted
replaced
1368:ad53f73020c2 | 1369:f3a549bd8688 |
---|---|
459 the same arguments? Maybe a more generic issue is: would there be a way for | 459 the same arguments? Maybe a more generic issue is: would there be a way for |
460 Theano to be more efficient when re-compiling the same function that was | 460 Theano to be more efficient when re-compiling the same function that was |
461 already compiled in the same program? (note that I am assuming here it is not | 461 already compiled in the same program? (note that I am assuming here it is not |
462 efficient, but I may be wrong). | 462 efficient, but I may be wrong). |
463 | 463 |
464 OD adds: After thinking more about it, this seems very close to my first | |
465 version where a function is automatically compiled "under the hood" when | |
466 iterating on a dataset and accessing the numeric value of a resulting | |
467 sample. The main differences are: | |
468 - In your version, the result is directly a numeric value, while in my version | |
469 one would obtain symbolic samples and would need to call some method to | |
470 obtain their numeric value. I think I like mine a bit better because it | |
471 means you can use the same syntax to e.g. iterate on a dataset, whether you | |
472 are interested in the symbolic representation of samples, or their numeric | |
473 values. On another hand, doing so could be less efficient since you create an | |
474 intermediate representation you may not use. The overhead does not seem much | |
475 to me but I am not sure about that. | |
476 - In your version, you can provide to the function e.g. compile modes / | |
477 givens. This could probably also be done in my version, although it makes it | |
478 more difficult if you want to cache the function to avoid compiling it more | |
479 than once (see next point). | |
480 - (Related to my first comment above) In your version it seems like a new | |
481 function would be compiled every time the user calls e.g. | |
482 'numeric_iterator', while in my version the function would be compiled only | |
483 once. Maybe this can be solved at the Theano level with an efficient | |
484 function cache? | |
485 | |
464 Discussion: Dataset as Learner Ouptut | 486 Discussion: Dataset as Learner Ouptut |
465 ------------------------------------- | 487 ------------------------------------- |
466 | 488 |
467 James asks: | 489 James asks: |
468 What's wrong with simply passing the variables corresponding to the dataset to | 490 What's wrong with simply passing the variables corresponding to the dataset to |