Comments (5)
There was some previous discussion on this topic in this thread
http://groups.google.com/group/theano-users/browse_thread/thread/8e2bb15da0ec7457/94e6aa90deb8d473?lnk=gst&q=roll#94e6aa90deb8d473
I had also implemented roll in an Op by wrapping numpy.roll. This was
faster in some cases but also more specific (see e-mail thread for speed
differences). It is available on my roll_op branch. I'm happy to issue a
pull request for this if people prefer it to the roll function.
https://github.com/mrocklin/Theano/blob/roll_op/theano/tensor/basic.py
I don't know much about making theano fast but I'll contribute my (rather
uninformed) thoughts anyway. Rather than writing a specialized C version
work could be done to make SubTensor and Join more efficient. This would
speed up roll and probably many other things as well. In my experience
excellent code is not built by creating many specialized structures.
Instead excellent code is built by creating a few very efficient and very
robust structures and having all other code rely on them. Subtensor and
Join seem like good candidates for this.
On Wed, Nov 23, 2011 at 3:12 PM, David Warde-Farley <
[email protected]
wrote:
There's a simple implementation mimicking
numpy.roll
contributed by
@mrocklin in pull request #221. However, it uses subtensors and Join, and
could probably be sped up quite a bit by writing a custom Op with C code.This would be a pretty easy task for someone who wanted to become familiar
with writing Ops, as it doesn't involve any particularly complicated logic,
just permuting things and doing the inverse permutation for the gradient.All the better if it has a flag that can operate in-place (obviously you
need a temporary buffer the size of a single element on the roll axis;
@nouiz may have some insight on the most efficient way to do this
cache-wise)
Reply to this email directly or view it on GitHub:
#222
from theano.
In my experience excellent code is not built by creating many specialized structures.
Indeed, I tend to agree. However, in the specific case of optimizing for speed, which is a major part of Theano's goal, optimizing memory access patterns play a rather crucial role. It can be quite hard to write something that's uniformly fast without special casing.
from theano.
I would call this low priority as I think it is not a bottle neck. So what do you mean by nice-to-have tag? Should we create a "low prio" tag?
from theano.
I meant "Nice-To-Have" as "would be nice, at some point, not necessary and certainly not critical", but yeah, a "Low Priority" tag would make this clear.
from theano.
(Also, I mainly created this ticket in that it might work well as an exercise for a student who wants to learn to write Ops, so that they start with something simple.)
from theano.
Related Issues (20)
- Dgemm Import Error HOT 2
- error installing Theano (virtualEnv with python 3.7, running on Ubuntu 20)
- 'DisconnectedType' object has no attribute 'dtype' HOT 1
- Hey there.
- The deeplearning.net website is down - 27 May '21 (10 AM IST)
- windows errors for “ImportError: DLL load failed while importing m885ff006a95d626dac547a7bdfdb471bbf058622ece2b4435e42316c4012ea56: 找不到指定的模块” HOT 1
- 'Tensor' object has no attribute 'reshape'
- ModuleNotFoundError: No module named 'theano' / working in ipython but not in VS code
- Theano crash when LSTM layer's hidden size is 1 using Keras backend
- matplotlib and keyring should be added to configuration files HOT 2
- deeplearning.net is DOWN
- Guided Backpropagation in Theano/Lasagne
- ImportError: cannot import name 'is_same_graph' HOT 2
- configparser.NoSectionError: No section: 'blas' (Theano does not run probably on Python 3.9 and Numpy 1.22.2) HOT 4
- Error while using pymc3 and Theano-PyMC package
- unexpected behaviour in dimension expansion
- theano error cannot convert 'cudnnConvolutionFwdAlgo_t*' to 'cudnnConvolutionFwdAlgoPerf_t
- TypeError: ufunc 'sin' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe'' HOT 1
- Project dependencies may have API risk issues HOT 1
- Incorrect Regular Expression Ranges
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 theano.