# HG changeset patch # User Razvan Pascanu # Date 1289580540 18000 # Node ID 049b99f4b3230c3ea0a86b6f281ac831da70247c # Parent 01157763c2d7c7a53189c2064d8e5104aa9ba839 reply to OD diff -r 01157763c2d7 -r 049b99f4b323 doc/v2_planning/datalearn.txt --- a/doc/v2_planning/datalearn.txt Fri Nov 12 11:36:30 2010 -0500 +++ b/doc/v2_planning/datalearn.txt Fri Nov 12 11:49:00 2010 -0500 @@ -227,6 +227,32 @@ for sample in graph(my_dataset): ... +RP answers: right. I was actually constructing this stupid example in my mind when +you would do like : + i1 = f1(data) + i2 = f2(i1) + i3 = f3(i2) + ... + iN = fN(iN-1) + and then you would say .. wait I want to do this on new_data as well. Oh no, I + have to copy the entire block or whatever. That is so annoying. But actually you + could just write: + + def my_f(data): + i1 = f1(data) + ... + return iN + + and then just use that function which is what you pointed out. I agree I'm + not sure anymore on the point that I was trying to make. Is like if you are + a lazy programmer, and you write everything without functions, you can + argue that you like more (2) because you only pass the dataset at the end + and not at the beginning. But if (1) would have the replace function this + argument will fail. Though this only stands if you like don't want to make + a function out of your pipeline that takes the dataset as input, which now + that I think about it is pretty stupid not to do. Sorry for that. + + - in approach (1) the initial dataset object (the one that loads the data) decides if you will use shared variables and indices to deal with the dataset or if you will use ``theano.tensor.matrix`` and not the user( at