Utility base class for the convolutional layer. More...
#include <dcnnelements.hpp>
Static Public Member Functions | |
Check functions | |
| static tagged::range_class< batch_tag > | forward_check (const input_data &ind, const weights &wtd, output_data &outd) |
Check argument compatibility for the forward function. | |
Static Public Attributes | |
| static constexpr std::size_t | fanin = khr.size() * kwr.size() * cir.size() |
| Number of inputs for each output element. | |
Dimension ranges | |
Each dimension range allows enumeration of all indexes in that dimension, using the | |
| static constexpr auto | hir = SPI::hr |
| Input image height range. | |
| static constexpr auto | wir = SPI::wr |
| Input image width range. | |
| static constexpr auto | cir = SPI::cr |
| Input image channel range. | |
| static constexpr auto | khr = KSP::khr |
| Kernel height range. | |
| static constexpr auto | kwr = KSP::kwr |
| Kernel width range. | |
| static constexpr auto | hor = SPO::hr |
| Output image height range. | |
| static constexpr auto | wor = SPO::wr |
| Output image width range. | |
| static constexpr auto | cor = SPO::cr |
| Output image channel range. | |
Input-kernel-output index convertors | |
Each quadruplet of functors serves for a different order of loop nesting, i.e. loops like for ( auto top_index_value : top_index_range )
{ auto mapping_functor = mf(top_index_value)
for ( auto mid_index_value : rf(top_index_value) )
{
auto bottom_index_value = mapping_functor(mid_index_value);
/*...*/
}
}
Each Each
| |
| static constexpr conv_ok_range_functor< tagged::selector< kernel_height_tag >, tagged::selector< height_out_tag >, hir.size(), khr.size(), 1 > | hokrf {} |
| output-height index to kernel-height range | |
| static constexpr conv_oki_map_functor< tagged::selector< height_in_tag >, tagged::selector< kernel_height_tag >, tagged::selector< height_out_tag >, khr.size(), 1 > | hokimf {} |
| output-height index to kernel-height index to input-height index | |
| static constexpr conv_ok_range_functor< tagged::selector< kernel_width_tag >, tagged::selector< width_out_tag >, wir.size(), kwr.size(), 1 > | wokrf {} |
| output-width index to kernel-width range | |
| static constexpr conv_oki_map_functor< tagged::selector< width_in_tag >, tagged::selector< kernel_width_tag >, tagged::selector< width_out_tag >, kwr.size(), 1 > | wokimf {} |
| output-width index to kernel-width index to input-width index | |
| static constexpr conv_ik_range_functor< tagged::selector< height_in_tag >, tagged::selector< kernel_height_tag >, hir.size(), khr.size(), 1 > | hikrf {} |
| input-height index to kernel-height range | |
| static constexpr conv_iko_map_functor< tagged::selector< height_in_tag >, tagged::selector< kernel_height_tag >, tagged::selector< height_out_tag >, khr.size(), 1 > | hikomf {} |
| input-height index to kernel-height index to output-height index | |
| static constexpr conv_ik_range_functor< tagged::selector< width_in_tag >, tagged::selector< kernel_width_tag >, wir.size(), kwr.size(), 1 > | wikrf {} |
| input-width index to kernel-width range | |
| static constexpr conv_iko_map_functor< tagged::selector< width_in_tag >, tagged::selector< kernel_width_tag >, tagged::selector< width_out_tag >, kwr.size(), 1 > | wikomf {} |
| input-width index to kernel-width index to output-width index | |
| static constexpr conv_ko_range_functor< tagged::selector< kernel_height_tag >, tagged::selector< height_out_tag >, hir.size(), khr.size(), 1 > | hkorf {} |
| kernel-height index to output-height range | |
| static constexpr conv_koi_map_functor< tagged::selector< kernel_height_tag >, tagged::selector< height_out_tag >, tagged::selector< height_in_tag >, khr.size(), 1 > | hkoimf {} |
| kernel-height index to output-height index to input-height index | |
| static constexpr conv_ko_range_functor< tagged::selector< kernel_width_tag >, tagged::selector< width_out_tag >, wir.size(), kwr.size(), 1 > | wkorf {} |
| kernel-width index to output-width range | |
| static constexpr conv_koi_map_functor< tagged::selector< kernel_width_tag >, tagged::selector< width_out_tag >, tagged::selector< width_in_tag >, kwr.size(), 1 > | wkoimf {} |
| kernel-width index to output-width index to input-width index | |
Utility base class for the convolutional layer.
| SPI | Input size policy |
| SPO | Output size policy |
| KSP | Kernel size policy |
| PP | Permutation policy |
|
inlinestatic |
Check argument compatibility for the forward function.
| ind | Input activations |
| wtd | Weights |
| outd | Output activations |