102 std::size_t visibles=m_operator.rbm()->numberOfVN();
103 std::size_t hiddens=m_operator.rbm()->numberOfHN();
104 m_temperedChains =
SampleBatch(temperatures,visibles,hiddens);
105 m_betas.resize(temperatures);
166 SHARK_RUNTIME_CHECK(m_temperedChains.size() != 0,
"You did not initialize the number of temperatures bevor initializing the chain!");
167 std::size_t visibles = m_operator.rbm()->numberOfVN();
168 RealMatrix sampleData(m_temperedChains.size(),visibles);
170 for(std::size_t i = 0; i != m_temperedChains.size(); ++i){
192 for(std::size_t i = 0; i != k; ++i){
194 m_operator.stepVH(m_temperedChains.hidden, m_temperedChains.visible,1,m_betas);
197 m_temperedChains.energy = m_operator.calculateEnergy(
198 m_temperedChains.hidden,
199 m_temperedChains.visible
203 std::size_t elems = m_temperedChains.size();
204 for(std::size_t i = 0; i < elems-1; i+=2){
206 reference(m_temperedChains,i),m_betas(i),
207 reference(m_temperedChains,i+1),m_betas(i+1)
211 for(std::size_t i = 1; i < elems-1; i+=2){
213 reference(m_temperedChains,i),m_betas(i),
214 reference(m_temperedChains,i+1),m_betas(i+1)
217 m_operator.rbm()->hiddenNeurons().sufficientStatistics(
218 m_temperedChains.hidden.input,m_temperedChains.hidden.statistics, m_betas