Skip to content

Instantly share code, notes, and snippets.

@hartikainen
Last active February 1, 2020 14:31
Show Gist options
  • Save hartikainen/3a9815cf66519c40eba517e3dce484ab to your computer and use it in GitHub Desktop.
Save hartikainen/3a9815cf66519c40eba517e3dce484ab to your computer and use it in GitHub Desktop.
import tensorflow as tf
import tensorflow_probability as tfp
def main():
x = tf.Variable(0.5)
y = tfp.util.DeferredTensor(x, tf.exp)
print(y.numpy()) # y.transform_fn(y.variables).numpy() works.
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment