Hi Fred, thanks for your answer.
It seems to me that scan should just return data in the format of the inner
function (except with an added dimension to each tensor). The
"return_list" flag feels like an unnecessary workaround.
If the function had been
def mul_by_2(data):
return data*2
y, updates = theano.scan(mul_by_2, sequences = [x])
Then I would expect y to be a tensor. But if it's
def mul_by_2(data):
return (data*2, )
y, updates = theano.scan(mul_by_2, sequences = [x])
I can't see why anyone would expect y to be a tensor instead of a tuple
containing a tensor.
I get that the optional return of updates complicates this a bit, because
the return of the inner function no longer exactly corresponds to the
"outputs".
But I guess if you're worried about backwards-compatibility, then the
"return_list" flag is a necessary evil.
--
---
You received this message because you are subscribed to the Google Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.