Last active
March 28, 2020 03:48
-
-
Save eigenfoo/0bc4047ea0245a3f5f3c3a6ff8143154 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Model | |
def linear_regression(x): | |
scale = tfd.HalfCauchy(0, 1) | |
coefs = tfd.Normal(tf.zeros(x.shape[1]), 1) | |
predictions = tfd.Normal(tf.linalg.matvec(x, coefs), scale) | |
return predictions | |
linear_regression.model_generator(tf.zeros([3, 10])) # Shape is irrelevant here | |
# Out[8]: | |
# <generator object _pm_compiled_model_generator at 0x107a5c5c8> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment