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

Speed up logic in ed.copy; distinguish reference tensor from tf.Variable #616

Merged
merged 9 commits into from
Apr 19, 2017

Conversation

dustinvtran
Copy link
Member

@dustinvtran dustinvtran commented Apr 18, 2017

This fixes the note in #471 (comment). As a minimal working example:

import edward as ed
import tensorflow as tf
from edward.models import WishartCholesky

W_prior = tf.Variable(tf.constant([[1., 0.], [0., 1.]]))
sigma = WishartCholesky(df=3.0, scale=W_prior)
ed.copy(sigma)

With this PR it succeeds; previously it fails (tf.__version__ == '1.0.1'). It was an issue where returning the reference tensor forces a downstream error when building WishartCholesky; returning the associated tf.Variable fixes it.

I also sped up some of the logic in ed.copy.

@dustinvtran dustinvtran force-pushed the bugfix/copy branch 8 times, most recently from 335a112 to 2439450 Compare April 19, 2017 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant