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

init_params in v.0.30.1 #2192

Closed
evolbeginner opened this issue Apr 15, 2024 · 2 comments
Closed

init_params in v.0.30.1 #2192

evolbeginner opened this issue Apr 15, 2024 · 2 comments

Comments

@evolbeginner
Copy link

Dear Turing,

I upgraded turing from v0.29 to v0.30 and seems that v0.30.1 does not consider init_params. for example, the following worked well in v.29.3 within a few seconds but took a very long time in v0.30.1.

@model function demo()
                 X = Vector{Real}(undef, 30)

                 for i in 1:length(X)
                         X[i] ~ Uniform(0,1)
                 end

                 for i in 1:(length(X)-1)
                      if !(X[i] < X[i+1])
                          Turing.@addlogprob! -Inf
                          return
                      end
                  end
              return X
       end

chain = sample(demo(), NUTS(100,0.65), 10000, init_params=range(0.01,0.99,length=30))

actually, it gave me a warning msg saying that "try to provide initial values of the parameters by init_params".

Would you please mind having a look at it? Thank you much!

@devmotion
Copy link
Member

The keyword argument was changed to initial_params: #2150 (comment)

@evolbeginner
Copy link
Author

The keyword argument was changed to initial_params: #2150 (comment)

Thanks so much! It worked well.

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