Skip to content
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

theano_function unable to convert consecutive trigonometry multiplication #14656

Open
extraymond opened this issue Apr 24, 2018 · 0 comments
Open
Labels

Comments

@extraymond
Copy link
Contributor

System info:

  • LIb: Sympy(1.1.1), theano(1.0.1) via conda-forge.
  • Python: I'm using python 3.6
  • OS: ubuntu 18.04

Problem:

I've tried to convert a matrix containing multiple trigonometry functions to theano_code by theano_function, this is what I've found:

  1. when number of trig_function is less then 3, everything is fine.
    This will give generate a valid function.
function = theano_code([theta1, theta2], [cos(theta1) * sin(theta2)])
  1. However, when consecutive multiplication happens, theano_function will raise error.
    This will not pass the code_gen:
function = theano_code([theta1, theta2], [cos(theta1) * sin(theta2)* cos(theta1])

And the error message:

Input 0 of the graph (indices start from 0), used to compute Elemwise{sin,no_inplace}(theta1_t), was not provided and not given a value.

I was wondering what cause this behavior, the temporary fix is to create a thin layer that take out part of the trigonometry variables out, but is a really messy solution IMO.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants