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

Add overloaded Python arithmetic methods to meta TF tensor #79

Merged

Conversation

brandonwillard
Copy link
Contributor

This PR makes it possible to do simple arithmetic simply. For example,

x_mt = mt.Placeholder('float')
y_mt = mt.Placeholder('float')

x_mt + y_mt
x_mt - y_mt
x_mt * y_mt
x_mt / y_mt
x_mt**y_mt
abs(x_mt)
-x_mt

@brandonwillard brandonwillard added the enhancement New feature or request label Oct 24, 2019
@brandonwillard brandonwillard self-assigned this Oct 24, 2019
@brandonwillard
Copy link
Contributor Author

This partially addresses #55. Methods like __getitem__ that contain more logic will need special attention (e.g. recreating/reusing existing TF functionality).

@brandonwillard brandonwillard merged commit dff6ff4 into pymc-devs:master Oct 24, 2019
@brandonwillard brandonwillard deleted the overload-tf-arithmetic-methods branch October 24, 2019 20:31
@brandonwillard brandonwillard added meta graph This issue involves the meta graph objects TensorFlow This issue involves the TensorFlow backend labels Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request meta graph This issue involves the meta graph objects TensorFlow This issue involves the TensorFlow backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant