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

#ifndef ETL_IMPL_STD_CONV_MMUL_HPP
#define ETL_IMPL_STD_CONV_MMUL_HPP

#include <algorithm>

namespace etl {

namespace impl {

namespace reduc {

template<typename I, typename K, typename C>
void conv1_full(const I& input, const K& kernel, C&& conv){
    conv = row(
        mmul(
            reshape(kernel, 1, dim<0>(kernel)),
            convmtx(input, 3)
        )
        , 0
    );
}

template<typename I, typename K, typename C>
void conv2_full(const I& input, const K& kernel, C&& conv){
    conv = transpose(reshape(
        mmul(
            convmtx2(input, etl::dim<0>(kernel), etl::dim<1>(kernel)),
            reshape(transpose(kernel), etl::size(kernel), 1)
        ), 
        etl::dim<0>(input) + etl::dim<0>(kernel) - 1, etl::dim<1>(input) + etl::dim<1>(kernel) - 1)
    );
}

} //end of namespace standard
} //end of namespace impl
} //end of namespace etl<commit_msg>Fix bug<commit_after>//=======================================================================
// Copyright (c) 2014-2015 <NAME>
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
//  http://opensource.org/licenses/MIT)
//=======================================================================

#ifndef ETL_IMPL_STD_CONV_MMUL_HPP
#define ETL_IMPL_STD_CONV_MMUL_HPP

#include <algorithm>

namespace etl {

namespace impl {

namespace reduc {

template<typename I, typename K, typename C>
void conv1_full(const I& input, const K& kernel, C&& conv){
    conv = row(
        mmul(
            reshape(kernel, 1, dim<0>(kernel)),
            convmtx(input, dim<0>(kernel))
        )
        , 0
    );
}

template<typename I, typename K, typename C>
void conv2_full(const I& input, const K& kernel, C&& conv){
    conv = transpose(reshape(
        mmul(
            convmtx2(input, etl::dim<0>(kernel), etl::dim<1>(kernel)),
            reshape(transpose(kernel), etl::size(kernel), 1)
        ), 
        etl::dim<0>(input) + etl::dim<0>(kernel) - 1, etl::dim<1>(input) + etl::dim<1>(kernel) - 1)
    );
}

} //end of namespace standard
} //end of namespace impl
} //end of namespace etl
{'fraction_non_alphanumeric': 0.24663127807268273, 'fraction_numerical': 0.019599836668027767, 'mean_word_length': 3.5036764705882355, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, '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': '1541318', 'n_tokens_mistral': 825, 'n_tokens_neox': 759, 'n_words': 198}