Composite variables

2 views
Skip to first unread message

Ian Goodfellow

unread,
Jan 31, 2012, 5:16:01 PM1/31/12
to thean...@googlegroups.com
Do we currently have any support for a composite variable, ie a
variable that has several fields which are in turn theano variables?

To make this more concrete, suppose we want to make an op called
multiscale_convolution that does convolution with n sizes of kernel
and emits n different tensors. It would be nice to keep these n
tensors grouped as a single Theano variable so that we can easily do
things like treat all of them as a single entry in an updates
dictionary. Do we have any kind of class that supports this kind of
thing, and if not, is it something it would be feasible for me to add?
I ask because I think this would be a useful feature for TheanoLinear.

James Bergstra

unread,
Jan 31, 2012, 5:29:48 PM1/31/12
to thean...@googlegroups.com
Good question. If there had been good support for this, we might have been able to use it for the sparse matrix module, rather than defining a separate type to stand for a (values, column coord, row ptr) triplet of dense vectors.

I've put off trying to do a good job at least once or twice before for lack of inspiration, and none has struck since to be honest.  The modules I made for pylearn had their .params lists. SparseMatrix was done as a special Theano type. But have a crack at it if you like! Consider working on a branch of TheanoLinear first, and then making a pitch for merging to Theano if it turns out to be a good general solution. If it doesn't turn out to be a good general solution, then at least it will fill an interface gap in TheanoLinear and we can always consider switching to a general solution further in the future.

David Warde-Farley

unread,
Jan 31, 2012, 5:52:51 PM1/31/12
to thean...@googlegroups.com
On Tue, Jan 31, 2012 at 05:16:01PM -0500, Ian Goodfellow wrote:
> Do we currently have any support for a composite variable, ie a
> variable that has several fields which are in turn theano variables?
>
> To make this more concrete, suppose we want to make an op called
> multiscale_convolution that does convolution with n sizes of kernel
> and emits n different tensors. It would be nice to keep these n
> tensors grouped as a single Theano variable so that we can easily do
> things like treat all of them as a single entry in an updates
> dictionary.

What sort of update would you do on such a non-numeric value? I guess
just replacement?

David

Ian Goodfellow

unread,
Feb 1, 2012, 10:14:02 AM2/1/12
to thean...@googlegroups.com
i was envisioning this as still numeric, just not organized as a
single tensor. ie, a pair of tensors is still just as numeric as one
tensor. i'm also not sure what you mean by replacement. aren't our
updates always replacement?
Reply all
Reply to author
Forward
0 new messages