You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Theano support: tensor.dimshuffle('x', 0, ...) together with tensor.dimshuffle(['x', 0, ...]). I think it is a good idea to support both syntacsis in cgt because theano-people use both.
The text was updated successfully, but these errors were encountered:
We will add this functionality in the next little while.
If you can't wait, dimshuffle is entirely contained in cgt.api. Adding this feature would amount to adding a check for a tuple and converting it to a list at the beginning of the function.
Adding this feature would amount to adding a check for a tuple and converting it to a list at the beginning of the function.
Not quite. It would need changing dimshuffle in core.py from:
defdimshuffle(self, pattern):
"see cgt.dimshuffle"returncgt.dimshuffle(self, pattern)
to
defdimshuffle(self, *pattern):
"see cgt.dimshuffle"iflen(pattern) ==1andisinstance(pattern[0], list):
pattern=pattern[0]
returncgt.dimshuffle(self, pattern)
Alternatively, you could have Node.dimshuffle pass on *pattern unchanged and modify cgt.dimshuffle to take an argument list and check whether it's a single argument of type list as above. Note that you won't be able to add any positional arguments to dimshuffle in future if you go that route.
Theano support: tensor.dimshuffle('x', 0, ...) together with tensor.dimshuffle(['x', 0, ...]). I think it is a good idea to support both syntacsis in cgt because theano-people use both.
The text was updated successfully, but these errors were encountered: