Help with Higher-Order Autodiff Includes

41 visninger
Gå til det første ulæste opslag

Michael Betancourt

ulæst,
13. apr. 2016, 16.14.2213.04.2016
til stan development mailing list
I’m working on implementing on the SoftAbs metric for all of the samplers,
but I’m not sure how to properly include the higher-order autodiff. To see
the current compiler errors you can run the broken test in stan-dev/stan,

make clean-all
git checkout feature/issue-304-add_rhmc
./runTests.py src/test/unit/mcmc/hmc/hamiltonians/softabs_metric_test.cpp

If anyone wants to peruse the implementation of the SoftAbs metric in
src/stan/mcmc/hmc/hamiltonians/softabs_metric.hpp I would also be
appreciative. I’m trying not to prematurely optimize, but Riemannian
HMC is going to use a lot more memory so there will likely be lots of
improvements to the code. For reference the analytical equations are
all in http://arxiv.org/abs/1212.4693.

Rob Trangucci

ulæst,
13. apr. 2016, 18.20.5813.04.2016
til stan...@googlegroups.com
Putting:

#include <stan/math/mix/mat.hpp>

in the includes for src/test/unit/mcmc/hmc/hamiltonians/softabs_metric_test.cpp

and changing line 89 in src/stan/mcmc/hmc/hamiltonians/softabs_metric.hpp:

from:

softabs_fun<Model>(this->_model, 0), z.q, B, a);

to

softabs_fun<Model>(this->model_, 0), z.q, B, a);

I get the test to compile, but the test fails with:

Running main() from gtest_main.cc

[==========] Running 3 tests from 1 test case.

[----------] Global test environment set-up.

[----------] 3 tests from McmcSoftAbs

[ RUN      ] McmcSoftAbs.sample_p

Assertion failed: (m_isInitialized && "SelfAdjointEigenSolver is not initialized."), function eigenvectors, file /Users/RobTrangucci/math/lib/eigen_3.2.8/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h, line 232.

test/unit/mcmc/hmc/hamiltonians/softabs_metric --gtest_output="xml:test/unit/mcmc/hmc/hamiltonians/softabs_metric.xml" failed

exit now (04/13/16 18:17:45 EDT)


Rob


--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Betancourt

ulæst,
13. apr. 2016, 19.34.0413.04.2016
til stan...@googlegroups.com
Sweet, I can take it from here.  Thanks!
Svar alle
Svar til forfatter
Videresend
0 nye opslag