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

[Relay][OP] Add comparison operator overloading #2910

Closed
haojin2 opened this issue Mar 27, 2019 · 2 comments
Closed

[Relay][OP] Add comparison operator overloading #2910

haojin2 opened this issue Mar 27, 2019 · 2 comments

Comments

@haojin2
Copy link
Contributor

haojin2 commented Mar 27, 2019

Environment: Ubuntu 18.04
Python Version: Python 3.6.7
Minimal Reproduction Script:

from tvm import relay
a = relay.Var("a")
b = relay.expr.const(1.0, dtype='float32')
c = a < b

Error:

TypeError: '<' not supported between instances of 'Var' and 'Constant'
@tqchen tqchen changed the title [Relay] "<" does not work in Relay on Python3 [Relay][OP] Add comparison operator overloading Mar 27, 2019
@u99127
Copy link
Contributor

u99127 commented May 9, 2019

Probably a dumb question, but is c = a < b the same as using of c = relay.less (a, b); ?

u99127 pushed a commit to u99127/tvm that referenced this issue May 10, 2019
This commit adds support for overloaded comparison operators
in the python binding for relay.
u99127 pushed a commit to u99127/tvm that referenced this issue Jun 1, 2019
This commit adds support for overloaded comparison operators
in the python binding for relay.

Add a testcase for this
@u99127
Copy link
Contributor

u99127 commented Jun 5, 2019

Now merged, I suspect closed by the commit.

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

No branches or pull requests

3 participants