New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easily mix theano and non-theano code in a graph #1784
Comments
I'd say a basic decorator that makes a theano op out of a function is certainly possible. I even have sample code to do that at #1785. |
I didn't review it now. This could work, but it would miss not just the But why the user can't just build a python function, that take as input On Sat, Mar 29, 2014 at 11:58 PM, abergeron notifications@github.comwrote:
|
I know it's missing infer_shape() and that's why I wrote the stuff in the documenation about optimizing problems. Which is why I also agree with the second paragraph about making a function that builds a symbolic graph. If that is possible, it would be a much better alternative. |
@nouiz the big use case is exactly what you describe "If the user want to express something that Theano isn't great (loop are complex and control logic too)". |
I strongly support this. |
gh-1785 is now merged. So I'll close this. Keep us updated on your finding/usage of it. |
In pymc3 we have samplers that require the gradient and some that don't. For those that don't need the gradient, we would like to allow users to write their own likelihoods in pure-python code.
Currently they'd have to create a new theano Op for each non-theano function. It would be great if this process would be much simpler. I would imagine that I could either combine python-functions with theano-ops automatically where theano detects it can not see into the function and just treats it as a blackbox Op, or a decorator for a python function that creates a blackbox Op for it.
Is this already possible somehow? If not, what are the chances this would get included?
The text was updated successfully, but these errors were encountered: