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

Attempt fixing bnn tests in Ezyme PR #2277

Closed
torfjelde opened this issue Jul 1, 2024 · 3 comments
Closed

Attempt fixing bnn tests in Ezyme PR #2277

torfjelde opened this issue Jul 1, 2024 · 3 comments
Assignees

Comments

@torfjelde
Copy link
Member

Turing.jl/test/mcmc/hmc.jl

Lines 106 to 121 in cbd5d79

@model function bnn(ts)
b1 ~ MvNormal([0. ;0.; 0.],
[var_prior 0. 0.; 0. var_prior 0.; 0. 0. var_prior])
w11 ~ MvNormal([0.; 0.], [var_prior 0.; 0. var_prior])
w12 ~ MvNormal([0.; 0.], [var_prior 0.; 0. var_prior])
w13 ~ MvNormal([0.; 0.], [var_prior 0.; 0. var_prior])
bo ~ Normal(0, var_prior)
wo ~ MvNormal([0.; 0; 0],
[var_prior 0. 0.; 0. var_prior 0.; 0. 0. var_prior])
for i = rand(1:N, 10)
y = nn(xs[i], b1, w11, w12, w13, bo, wo)
ts[i] ~ Bernoulli(y)
end
b1, w11, w12, w13, bo, wo
end

@torfjelde torfjelde self-assigned this Jul 1, 2024
@torfjelde
Copy link
Member Author

@wsmoses explained that the hvcat call hit due to the syntactic sugar we use in the bnn model won't be an issue if the entire thing is type-stable, so it might be fixed by simply moving the var_prior into the arguments of the model or something. Giviing that a go now.

@torfjelde
Copy link
Member Author

@wsmoses @mhauru

@yebai
Copy link
Member

yebai commented Jul 18, 2024

Fixed by 5bfd06d

@yebai yebai closed this as completed Jul 18, 2024
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

No branches or pull requests

2 participants