<commit_before>//=======================================================================
// Copyright (c) 2014 <NAME>
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
//  http://opensource.org/licenses/MIT)
//=======================================================================

#include "dll/conv_rbm_mp.hpp"

template<typename RBM>
void test_rbm(){
    RBM rbm;

    std::vector<double> test(28 * 28, 1.0);
    rbm.reconstruct(test);

    std::vector<std::vector<double>> test_full;
    rbm.train(test_full, 40);
}

int main(){
    //Very basic RBM that must compile
    //typedef dll::conv_rbm<dll::conv_layer<dll::conv_conf<true, 50, dll::unit_type::BINARY, dll::unit_type::SIGMOID>, 32, 12, 40>> crbm_1;
    typedef dll::conv_rbm_mp<dll::conv_rbm_mp_desc<28, 1, 12, 40, 2>> crbm_1;

    std::cout << "NV*NV=" << std::remove_reference<decltype(crbm_1::v1)>::type::etl_size << std::endl;
    std::cout << "NH*NH=" << std::remove_reference<decltype(crbm_1::h1_a)>::type::etl_size << std::endl;
    std::cout << "NW*NW=" << std::remove_reference<decltype(crbm_1::w)>::type::etl_size << std::endl;

    typedef dll::conv_rbm_mp<dll::conv_rbm_mp_desc<28, 1, 12, 40, 2, dll::momentum, dll::batch_size<50>>> crbm_2;

    //Test them all

    test_rbm<crbm_1>();
    test_rbm<crbm_2>();

    return 0;<commit_msg>Test for CRBM MP<commit_after>//=======================================================================
// Copyright (c) 2014 <NAME>
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
//  http://opensource.org/licenses/MIT)
//=======================================================================

#include "dll/conv_rbm_mp.hpp"

template<typename RBM>
void test_rbm(){
    RBM rbm;

    std::vector<double> test(28 * 28, 1.0);
    rbm.reconstruct(test);

    std::vector<std::vector<double>> test_full;
    rbm.train(test_full, 40);

    std::vector<double> v(28 * 28 * 1);
    std::vector<double> h(12 * 12 * 40);
    rbm.energy(v, h);
}

int main(){
    //Very basic RBM that must compile
    //typedef dll::conv_rbm<dll::conv_layer<dll::conv_conf<true, 50, dll::unit_type::BINARY, dll::unit_type::SIGMOID>, 32, 12, 40>> crbm_1;
    typedef dll::conv_rbm_mp<dll::conv_rbm_mp_desc<28, 1, 12, 40, 2>> crbm_1;

    std::cout << "NV*NV=" << std::remove_reference<decltype(crbm_1::v1)>::type::etl_size << std::endl;
    std::cout << "NH*NH=" << std::remove_reference<decltype(crbm_1::h1_a)>::type::etl_size << std::endl;
    std::cout << "NW*NW=" << std::remove_reference<decltype(crbm_1::w)>::type::etl_size << std::endl;

    typedef dll::conv_rbm_mp<dll::conv_rbm_mp_desc<28, 1, 12, 40, 2, dll::momentum, dll::batch_size<50>>> crbm_2;

    //Test them all

    test_rbm<crbm_1>();
    test_rbm<crbm_2>();

    return 0;
{'fraction_non_alphanumeric': 0.2715044247787611, 'fraction_numerical': 0.038584070796460174, 'mean_word_length': 5.28, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4024751', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1012, 'n_words': 192}