BlackCat_Tensors
A GPU-supported autograd and linear algebra library, designed for neural network construction
|
Namespaces | |
detail | |
functions | |
Classes | |
struct | Adam |
struct | Cache |
A Dictionary designed to store any type using the 'store' and 'load' functions. More... | |
struct | cache_key |
struct | Convolution |
struct | FeedForward |
struct | Flatten |
struct | Function |
struct | Layer_Base |
class | Layer_Input_Base |
struct | Layer_Loader |
struct | Layer_Manager |
struct | Layer_Output_Base |
struct | layer_traits |
struct | LayerChain |
Layer_Chain is an iterator-like object that connects different types of neural-network layers and defines convenient iterator-like methods. More... | |
struct | LayerChain< Index, Derived, CurrentLayer, Layers... > |
struct | Logging_Output_Layer |
struct | LSTM |
struct | Max_Pooling |
struct | Mean_Absolute_Error |
struct | Mean_Absolute_Percent_Error |
struct | Mean_Squared_Error |
struct | Momentum |
struct | network_runtime_traits |
struct | NeuralNetwork |
the Neural_Network More... | |
struct | Optimizer_Base |
struct | Output_Layer |
struct | Polymorphic_Layer_Base |
struct | Recurrent |
struct | Root_Mean_Squared_Error |
struct | SoftMax |
struct | Stochastic_Gradient_Descent |
struct | tensor_descriptor |
struct | Tensor_Descriptor |
Typedefs | |
template<class ValueType , class SystemTag , class... AltAllocator> | |
using | nn_default_allocator_type = bc::allocators::Recycle_Allocator< ValueType, SystemTag, AltAllocator... > |
using | nn_default_system_tag = bc::host_tag |
using | nn_default_optimizer_type = Momentum |
template<class SystemTag , class ValueType > | |
using | layer_default_allocator = bc::allocators::Polymorphic_Allocator< SystemTag, ValueType > |
Enumerations | |
enum | cache_key_type { inherit, always_recurrent, always_forward } |
A type designed to act as a key to the Cache object. More... | |
Functions | |
template<class SystemTag = BLACKCAT_DEFAULT_SYSTEM_T, class Optimizer = nn_default_optimizer_type> | |
auto | convolution (SystemTag system_tag, Dim< 3 > img_dims, Dim< 3 > krnl_dims, Dim< 2 > padding=Dim< 2 >().fill(0), Dim< 2 > strides=Dim< 2 >().fill(1), Dim< 2 > dilation=Dim< 2 >().fill(1), Optimizer=Optimizer()) |
template<class SystemTag = BLACKCAT_DEFAULT_SYSTEM_T, class Optimizer = nn_default_optimizer_type> | |
auto | recurrent_convolution (SystemTag system_tag, Dim< 3 > img_dims, Dim< 3 > krnl_dims, Dim< 2 > padding=Dim< 2 >().fill(0), Dim< 2 > strides=Dim< 2 >().fill(1), Dim< 2 > dilation=Dim< 2 >().fill(1), Optimizer=Optimizer()) |
template<class SystemTag , class Optimizer > | |
auto | convolution (SystemTag system_tag, Dim< 3 > img_dims, Dim< 3 > krnl_dims, Optimizer, Dim< 2 > padding=Dim< 2 >().fill(0), Dim< 2 > strides=Dim< 2 >().fill(1), Dim< 2 > dilation=Dim< 2 >().fill(1)) |
template<class SystemTag , class Optimizer > | |
auto | recurrent_convolution (SystemTag system_tag, Dim< 3 > img_dims, Dim< 3 > krnl_dims, Optimizer, Dim< 2 > padding=Dim< 2 >().fill(0), Dim< 2 > strides=Dim< 2 >().fill(1), Dim< 2 > dilation=Dim< 2 >().fill(1)) |
template<class SystemTag , class Optimizer = nn_default_optimizer_type> | |
auto | feedforward (SystemTag system_tag, int inputs, int outputs, Optimizer=Optimizer()) |
template<class Optimizer = nn_default_optimizer_type> | |
auto | feedforward (int inputs, int outputs, Optimizer=Optimizer()) |
template<class ValueType , class SystemTag , int X> | |
auto | flatten (SystemTag system_tag, Dim< X > shape) |
template<class SystemTag , int X> | |
auto | flatten (SystemTag system_tag, Dim< X > shape) |
template<int X> | |
auto | flatten (Dim< X > shape) |
template<class ValueType , class SystemTag , class ErrorFunction = Mean_Absolute_Error> | |
Logging_Output_Layer< SystemTag, ValueType > | logging_output_layer (SystemTag system_tag, bc::size_t inputs, ErrorFunction error_function=ErrorFunction(), std::ostream &os=std::cout) |
template<class SystemTag , class ErrorFunction = Mean_Absolute_Error> | |
auto | logging_output_layer (SystemTag system_tag, bc::size_t inputs, ErrorFunction error_function=ErrorFunction(), std::ostream &os=std::cout) |
template<class ErrorFunction = Mean_Absolute_Error> | |
auto | logging_output_layer (int inputs, ErrorFunction error_function=ErrorFunction(), std::ostream &os=std::cout) |
template<class SystemTag , class Optimizer = nn_default_optimizer_type> | |
auto | lstm (SystemTag system_tag, int inputs, int outputs, Optimizer=Optimizer()) |
template<class Optimizer = nn_default_optimizer_type> | |
auto | lstm (int inputs, int outputs, Optimizer=Optimizer()) |
template<class ValueType , class SystemTag > | |
Max_Pooling< SystemTag, ValueType > | max_pooling (SystemTag system_tag, Dim< 3 > img_dims, Dim< 2 > krnl_dims={3, 3}, Dim< 2 > padding={0, 0}, Dim< 2 > strides={-1,-1}) |
template<class SystemTag > | |
auto | max_pooling (SystemTag system_tag, Dim< 3 > img_dims, Dim< 2 > krnl_dims={3, 3}, Dim< 2 > padding={0, 0}, Dim< 2 > strides={-1,-1}) |
auto | max_pooling (Dim< 3 > img_dims, Dim< 2 > krnl_dims={3, 3}, Dim< 2 > padding={0, 0}, Dim< 2 > strides={-1,-1}) |
auto | tanh (bc::size_t inputs) |
template<class ValueType , class SystemTag > | |
auto | tanh (SystemTag system, bc::size_t inputs) |
template<class SystemTag > | |
auto | tanh (SystemTag system, bc::size_t inputs) |
template<class ValueType , class SystemTag , int X> | |
auto | tanh (SystemTag system, bc::Dim< X > inputs) |
template<class SystemTag , int X> | |
auto | tanh (SystemTag system, bc::Dim< X > inputs) |
auto | logistic (bc::size_t inputs) |
template<class ValueType , class SystemTag > | |
auto | logistic (SystemTag system, bc::size_t inputs) |
template<class SystemTag > | |
auto | logistic (SystemTag system, bc::size_t inputs) |
template<class ValueType , class SystemTag , int X> | |
auto | logistic (SystemTag system, bc::Dim< X > inputs) |
template<class SystemTag , int X> | |
auto | logistic (SystemTag system, bc::Dim< X > inputs) |
auto | relu (bc::size_t inputs) |
template<class ValueType , class SystemTag > | |
auto | relu (SystemTag system, bc::size_t inputs) |
template<class SystemTag > | |
auto | relu (SystemTag system, bc::size_t inputs) |
template<class ValueType , class SystemTag , int X> | |
auto | relu (SystemTag system, bc::Dim< X > inputs) |
template<class SystemTag , int X> | |
auto | relu (SystemTag system, bc::Dim< X > inputs) |
auto | softplus (bc::size_t inputs) |
template<class ValueType , class SystemTag > | |
auto | softplus (SystemTag system, bc::size_t inputs) |
template<class SystemTag > | |
auto | softplus (SystemTag system, bc::size_t inputs) |
template<class ValueType , class SystemTag , int X> | |
auto | softplus (SystemTag system, bc::Dim< X > inputs) |
template<class SystemTag , int X> | |
auto | softplus (SystemTag system, bc::Dim< X > inputs) |
auto | mish (bc::size_t inputs) |
template<class ValueType , class SystemTag > | |
auto | mish (SystemTag system, bc::size_t inputs) |
template<class SystemTag > | |
auto | mish (SystemTag system, bc::size_t inputs) |
template<class ValueType , class SystemTag , int X> | |
auto | mish (SystemTag system, bc::Dim< X > inputs) |
template<class SystemTag , int X> | |
auto | mish (SystemTag system, bc::Dim< X > inputs) |
template<class ValueType , class SystemTag > | |
Output_Layer< SystemTag, ValueType > | output_layer (SystemTag system_tag, int inputs) |
template<class SystemTag > | |
auto | output_layer (SystemTag system_tag, int inputs) |
auto | output_layer (int inputs) |
template<class... ArgsA, class... ArgsB> | |
void | link (std::shared_ptr< Layer_Base< ArgsA... >> prev, std::shared_ptr< Layer_Base< ArgsB... >> next) |
template<class ValueType , class SystemTag > | |
Recurrent< SystemTag, ValueType > | recurrent (SystemTag system_tag, int inputs, int outputs) |
template<class SystemTag > | |
auto | recurrent (SystemTag system_tag, int inputs, int outputs) |
auto | recurrent (int inputs, int outputs) |
template<class ValueType , class SystemTag > | |
SoftMax< SystemTag, ValueType > | softmax (SystemTag system_tag, int inputs) |
template<class SystemTag > | |
auto | softmax (SystemTag system_tag, int inputs) |
auto | softmax (int inputs) |
template<class ValueType , class SystemTag , class Functor > | |
Function< SystemTag, ValueType, Functor > | function (SystemTag system_tag, int inputs, Functor function=Functor()) |
template<class SystemTag , class Functor > | |
auto | function (SystemTag system_tag, int inputs, Functor function=Functor()) |
template<class ValueType , class SystemTag , class Functor , int X> | |
Function< SystemTag, ValueType, Functor > | function (SystemTag system_tag, Dim< X > shape, Functor function=Functor()) |
template<class SystemTag , class Functor , int X> | |
auto | function (SystemTag system_tag, bc::Dim< X > shape, Functor function=Functor()) |
template<class ... Layers> | |
auto | neuralnetwork (Layers ... layers) |
Factory method for creating neural_networks. More... | |
Variables | |
struct bc::nn::Mean_Absolute_Error | MAE |
struct bc::nn::Root_Mean_Squared_Error | RMSE |
struct bc::nn::Mean_Squared_Error | MSE |
struct bc::nn::Mean_Absolute_Percent_Error | MAPE |
struct bc::nn::Adam | adam |
struct bc::nn::Momentum | momentum |
struct bc::nn::Stochastic_Gradient_Descent | sgd |
using bc::nn::layer_default_allocator = typedef bc::allocators::Polymorphic_Allocator<SystemTag, ValueType> |
using bc::nn::nn_default_allocator_type = typedef bc::allocators::Recycle_Allocator<ValueType, SystemTag, AltAllocator...> |
using bc::nn::nn_default_optimizer_type = typedef Momentum |
using bc::nn::nn_default_system_tag = typedef bc::host_tag |
A type designed to act as a key to the Cache object.
Arguments: K - any class to use as a key, generally "Name<char...>" class is used to create a constexpr name to the class. V - the type to return from the given key CacheKeyOverrider - Determines if the storing should override the most recent member store or if it should be stored in a separate location for back-propagation through time.
Enumerator | |
---|---|
inherit | |
always_recurrent | |
always_forward |
auto bc::nn::convolution | ( | SystemTag | system_tag, |
Dim< 3 > | img_dims, | ||
Dim< 3 > | krnl_dims, | ||
Dim< 2 > | padding = Dim<2>().fill(0) , |
||
Dim< 2 > | strides = Dim<2>().fill(1) , |
||
Dim< 2 > | dilation = Dim<2>().fill(1) , |
||
Optimizer | = Optimizer() |
||
) |
auto bc::nn::convolution | ( | SystemTag | system_tag, |
Dim< 3 > | img_dims, | ||
Dim< 3 > | krnl_dims, | ||
Optimizer | , | ||
Dim< 2 > | padding = Dim<2>().fill(0) , |
||
Dim< 2 > | strides = Dim<2>().fill(1) , |
||
Dim< 2 > | dilation = Dim<2>().fill(1) |
||
) |
auto bc::nn::feedforward | ( | SystemTag | system_tag, |
int | inputs, | ||
int | outputs, | ||
Optimizer | = Optimizer() |
||
) |
auto bc::nn::feedforward | ( | int | inputs, |
int | outputs, | ||
Optimizer | = Optimizer() |
||
) |
auto bc::nn::flatten | ( | SystemTag | system_tag, |
Dim< X > | shape | ||
) |
auto bc::nn::flatten | ( | SystemTag | system_tag, |
Dim< X > | shape | ||
) |
auto bc::nn::flatten | ( | Dim< X > | shape | ) |
Function<SystemTag, ValueType, Functor> bc::nn::function | ( | SystemTag | system_tag, |
int | inputs, | ||
Functor | function = Functor() |
||
) |
auto bc::nn::function | ( | SystemTag | system_tag, |
int | inputs, | ||
Functor | function = Functor() |
||
) |
Function<SystemTag, ValueType, Functor> bc::nn::function | ( | SystemTag | system_tag, |
Dim< X > | shape, | ||
Functor | function = Functor() |
||
) |
auto bc::nn::function | ( | SystemTag | system_tag, |
bc::Dim< X > | shape, | ||
Functor | function = Functor() |
||
) |
void bc::nn::link | ( | std::shared_ptr< Layer_Base< ArgsA... >> | prev, |
std::shared_ptr< Layer_Base< ArgsB... >> | next | ||
) |
Logging_Output_Layer<SystemTag, ValueType> bc::nn::logging_output_layer | ( | SystemTag | system_tag, |
bc::size_t | inputs, | ||
ErrorFunction | error_function = ErrorFunction() , |
||
std::ostream & | os = std::cout |
||
) |
auto bc::nn::logging_output_layer | ( | SystemTag | system_tag, |
bc::size_t | inputs, | ||
ErrorFunction | error_function = ErrorFunction() , |
||
std::ostream & | os = std::cout |
||
) |
auto bc::nn::logging_output_layer | ( | int | inputs, |
ErrorFunction | error_function = ErrorFunction() , |
||
std::ostream & | os = std::cout |
||
) |
auto bc::nn::logistic | ( | bc::size_t | inputs | ) |
auto bc::nn::logistic | ( | SystemTag | system, |
bc::size_t | inputs | ||
) |
auto bc::nn::logistic | ( | SystemTag | system, |
bc::size_t | inputs | ||
) |
auto bc::nn::logistic | ( | SystemTag | system, |
bc::Dim< X > | inputs | ||
) |
auto bc::nn::logistic | ( | SystemTag | system, |
bc::Dim< X > | inputs | ||
) |
auto bc::nn::lstm | ( | SystemTag | system_tag, |
int | inputs, | ||
int | outputs, | ||
Optimizer | = Optimizer() |
||
) |
auto bc::nn::lstm | ( | int | inputs, |
int | outputs, | ||
Optimizer | = Optimizer() |
||
) |
Max_Pooling<SystemTag, ValueType> bc::nn::max_pooling | ( | SystemTag | system_tag, |
Dim< 3 > | img_dims, | ||
Dim< 2 > | krnl_dims = {3,3} , |
||
Dim< 2 > | padding = {0,0} , |
||
Dim< 2 > | strides = {-1,-1} |
||
) |
auto bc::nn::max_pooling | ( | SystemTag | system_tag, |
Dim< 3 > | img_dims, | ||
Dim< 2 > | krnl_dims = {3,3} , |
||
Dim< 2 > | padding = {0,0} , |
||
Dim< 2 > | strides = {-1,-1} |
||
) |
auto bc::nn::max_pooling | ( | Dim< 3 > | img_dims, |
Dim< 2 > | krnl_dims = {3,3} , |
||
Dim< 2 > | padding = {0,0} , |
||
Dim< 2 > | strides = {-1,-1} |
||
) |
auto bc::nn::mish | ( | bc::size_t | inputs | ) |
auto bc::nn::mish | ( | SystemTag | system, |
bc::size_t | inputs | ||
) |
auto bc::nn::mish | ( | SystemTag | system, |
bc::size_t | inputs | ||
) |
auto bc::nn::mish | ( | SystemTag | system, |
bc::Dim< X > | inputs | ||
) |
auto bc::nn::mish | ( | SystemTag | system, |
bc::Dim< X > | inputs | ||
) |
auto bc::nn::neuralnetwork | ( | Layers ... | layers | ) |
Factory method for creating neural_networks.
Each layer defines its own respective factory_methods. It is generally recommended to use these factory methods opposed to instantiating a layer object manually.
Output_Layer<SystemTag, ValueType> bc::nn::output_layer | ( | SystemTag | system_tag, |
int | inputs | ||
) |
auto bc::nn::output_layer | ( | SystemTag | system_tag, |
int | inputs | ||
) |
auto bc::nn::output_layer | ( | int | inputs | ) |
Recurrent<SystemTag, ValueType> bc::nn::recurrent | ( | SystemTag | system_tag, |
int | inputs, | ||
int | outputs | ||
) |
auto bc::nn::recurrent | ( | SystemTag | system_tag, |
int | inputs, | ||
int | outputs | ||
) |
auto bc::nn::recurrent | ( | int | inputs, |
int | outputs | ||
) |
auto bc::nn::recurrent_convolution | ( | SystemTag | system_tag, |
Dim< 3 > | img_dims, | ||
Dim< 3 > | krnl_dims, | ||
Dim< 2 > | padding = Dim<2>().fill(0) , |
||
Dim< 2 > | strides = Dim<2>().fill(1) , |
||
Dim< 2 > | dilation = Dim<2>().fill(1) , |
||
Optimizer | = Optimizer() |
||
) |
auto bc::nn::recurrent_convolution | ( | SystemTag | system_tag, |
Dim< 3 > | img_dims, | ||
Dim< 3 > | krnl_dims, | ||
Optimizer | , | ||
Dim< 2 > | padding = Dim<2>().fill(0) , |
||
Dim< 2 > | strides = Dim<2>().fill(1) , |
||
Dim< 2 > | dilation = Dim<2>().fill(1) |
||
) |
auto bc::nn::relu | ( | SystemTag | system, |
bc::Dim< X > | inputs | ||
) |
auto bc::nn::relu | ( | SystemTag | system, |
bc::Dim< X > | inputs | ||
) |
auto bc::nn::relu | ( | SystemTag | system, |
bc::size_t | inputs | ||
) |
auto bc::nn::relu | ( | SystemTag | system, |
bc::size_t | inputs | ||
) |
auto bc::nn::relu | ( | bc::size_t | inputs | ) |
SoftMax<SystemTag, ValueType> bc::nn::softmax | ( | SystemTag | system_tag, |
int | inputs | ||
) |
auto bc::nn::softmax | ( | SystemTag | system_tag, |
int | inputs | ||
) |
auto bc::nn::softmax | ( | int | inputs | ) |
auto bc::nn::softplus | ( | SystemTag | system, |
bc::size_t | inputs | ||
) |
auto bc::nn::softplus | ( | SystemTag | system, |
bc::size_t | inputs | ||
) |
auto bc::nn::softplus | ( | SystemTag | system, |
bc::Dim< X > | inputs | ||
) |
auto bc::nn::softplus | ( | bc::size_t | inputs | ) |
auto bc::nn::softplus | ( | SystemTag | system, |
bc::Dim< X > | inputs | ||
) |
auto bc::nn::tanh | ( | SystemTag | system, |
bc::Dim< X > | inputs | ||
) |
auto bc::nn::tanh | ( | SystemTag | system, |
bc::Dim< X > | inputs | ||
) |
auto bc::nn::tanh | ( | SystemTag | system, |
bc::size_t | inputs | ||
) |
auto bc::nn::tanh | ( | bc::size_t | inputs | ) |
auto bc::nn::tanh | ( | SystemTag | system, |
bc::size_t | inputs | ||
) |
struct bc::nn::Adam bc::nn::adam |
struct bc::nn::Mean_Absolute_Error bc::nn::MAE |
struct bc::nn::Mean_Absolute_Percent_Error bc::nn::MAPE |
struct bc::nn::Momentum bc::nn::momentum |
struct bc::nn::Mean_Squared_Error bc::nn::MSE |
struct bc::nn::Root_Mean_Squared_Error bc::nn::RMSE |
struct bc::nn::Stochastic_Gradient_Descent bc::nn::sgd |