BlackCat_Tensors
A GPU-supported autograd and linear algebra library, designed for neural network construction
Public Types | Static Public Member Functions | List of all members
bc::nn::layer_traits< T > Struct Template Reference

#include <layer_traits.h>

Inheritance diagram for bc::nn::layer_traits< T >:
Inheritance graph
[legend]
Collaboration diagram for bc::nn::layer_traits< T >:
Collaboration graph
[legend]

Public Types

using system_tag = typename T::system_tag
 Layers have the function: backward_propagate(Args...); – The arguments supplied are based upon these traits. More...
 
using value_type = bc::traits::conditional_detected_t< bc::traits::query_value_type, T, typename system_tag::default_floating_point_type >
 
using allocator_type = bc::traits::conditional_detected_t< bc::traits::query_allocator_type, T, bc::Allocator< value_type, system_tag > >
 
using requires_extra_cache = bc::traits::conditional_detected_t< detail::query_requires_extra_cache, T, std::false_type >
 
using input_tensor_dim = bc::traits::conditional_detected_t< detail::query_input_tensor_dim, T, bc::traits::Integer< 1 > >
 
using output_tensor_dim = bc::traits::conditional_detected_t< detail::query_output_tensor_dim, T, input_tensor_dim >
 
using forward_requires_inputs = bc::traits::conditional_detected_t< detail::query_forward_requires_inputs, T, std::true_type >
 
using forward_requires_outputs = bc::traits::conditional_detected_t< detail::query_forward_requires_outputs, T, std::false_type >
 
using forward_requires_extra_cache = bc::traits::conditional_detected_t< detail::query_forward_requires_extra_cache, T, std::false_type >
 
using backward_requires_inputs = bc::traits::conditional_detected_t< detail::query_backward_requires_inputs, T, std::true_type >
 
using backward_requires_outputs = bc::traits::conditional_detected_t< detail::query_backward_requires_outputs, T, std::false_type >
 
using backward_delta_should_be_cached = bc::traits::conditional_detected_t< detail::query_backward_requires_outputs, T, std::false_type >
 
using backward_requires_extra_cache = bc::traits::conditional_detected_t< detail::query_backward_requires_extra_cache, T, std::false_type >
 
using greedy_evaluate_delta = bc::traits::conditional_detected_t< detail::query_greedy_evaluate_delta, T, std::false_type >
 
- Public Types inherited from bc::traits::common_traits< T >
using type = T
 
using defines_value_type = truth_type< is_detected_v< query_value_type, T > >
 
using defines_allocator_type = truth_type< is_detected_v< query_allocator_type, T > >
 
using defines_system_tag = truth_type< is_detected_v< query_system_tag, T > >
 
using defines_get_stream = truth_type< is_detected_v< query_get_stream, T > >
 
using defines_get_allocator = truth_type< is_detected_v< query_get_allocator, T > >
 
using value_type = conditional_detected_t< query_value_type, T, None >
 
using allocator_type = conditional_detected_t< query_allocator_type, T, None >
 
using system_tag = conditional_detected_t< query_system_tag, T, host_tag >
 

Static Public Member Functions

template<class... Args>
static auto select_on_predict (T &layer, Args &&... args)
 
template<class... Args>
static auto select_on_single_predict (T &layer, Args &&... args)
 

Member Typedef Documentation

◆ allocator_type

◆ backward_delta_should_be_cached

◆ backward_requires_extra_cache

◆ backward_requires_inputs

◆ backward_requires_outputs

◆ forward_requires_extra_cache

◆ forward_requires_inputs

◆ forward_requires_outputs

◆ greedy_evaluate_delta

◆ input_tensor_dim

◆ output_tensor_dim

◆ requires_extra_cache

◆ system_tag

template<class T>
using bc::nn::layer_traits< T >::system_tag = typename T::system_tag

Layers have the function: backward_propagate(Args...); – The arguments supplied are based upon these traits.

If forwards_requires_inputs==std::true_type, inputs will be supplied in forward prop If forwards_requires_outputs==std::true_type, outputs will be supplied in forward prop

If backwards_requires_inputs==std::true_type, inputs will be supplied in backward prop If backwards_requires_outputs==std::true_type, outputs will be supplied in backward prop

◆ value_type

template<class T>
using bc::nn::layer_traits< T >::value_type = bc::traits::conditional_detected_t< bc::traits::query_value_type, T, typename system_tag::default_floating_point_type>

Member Function Documentation

◆ select_on_predict()

template<class T>
template<class... Args>
static auto bc::nn::layer_traits< T >::select_on_predict ( T &  layer,
Args &&...  args 
)
inlinestatic

◆ select_on_single_predict()

template<class T>
template<class... Args>
static auto bc::nn::layer_traits< T >::select_on_single_predict ( T &  layer,
Args &&...  args 
)
inlinestatic

The documentation for this struct was generated from the following file: