Comments (3)
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.
from cgt.
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:
def dimshuffle(self, pattern):
"see cgt.dimshuffle"
return cgt.dimshuffle(self, pattern)
to
def dimshuffle(self, *pattern):
"see cgt.dimshuffle"
if len(pattern) == 1 and isinstance(pattern[0], list):
pattern = pattern[0]
return cgt.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.
from cgt.
Ah right. Forgot about modifying the shortcut in core.py. In any case this is a trivial thing to implement.
from cgt.
Related Issues (20)
- Product of diagonal elements may be `nan` HOT 1
- cgt.stack only supports stacking scalars HOT 1
- Error on tutorial
- Bug in graph simplification HOT 2
- OSX: Build fails with OpenBLAS dependency HOT 1
- Questions about Installation : cmake and windows HOT 1
- Memory consumption of native backend on Linux
- Random number generation and graph simplification HOT 2
- Negative reshaping check not enforced sometimes HOT 1
- Parameter indexing leads to an assertion error in module definition HOT 1
- Issues with shared scalar HOT 2
- Random number generation and modules (and simplification again)
- CIFAR Demo Error when using GPU
- Installation with anaconda
- Support for square root operation on Node HOT 2
- Simple operation breaks CGT
- Berkely BidMach and CGT
- How to build with python 3?
- Any reference to read? HOT 1
- Links in read-me are dead
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cgt.