BlackCat_Tensors
A GPU-supported autograd and linear algebra library, designed for neural network construction
Public Types | Public Member Functions | List of all members
bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity > Struct Template Reference

#include <lstm.h>

Inheritance diagram for bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >:
Inheritance graph
[legend]
Collaboration diagram for bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >:
Collaboration graph
[legend]

Public Types

using system_tag = SystemTag
 
using value_type = ValueType
 
using input_descriptor_t = Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > >
 
using parent_type = Layer_Base< LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >, input_descriptor_t >
 
using allocator_type = nn_default_allocator_type< ValueType, SystemTag >
 
using optimizer_type = Optimizer
 
using greedy_evaluate_delta = std::true_type
 
using forward_requires_outputs = std::true_type
 
using backward_requires_outputs = std::true_type
 
using requires_extra_cache = std::true_type
 
using is_recurrent = std::true_type
 
using defines_predict = std::true_type
 
using defines_single_predict = std::true_type
 
- Public Types inherited from bc::nn::Layer_Base< LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >, Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > >
using value_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::value_type
 
using system_tag = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::system_tag
 
using allocator_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::allocator_type
 
using input_tensor_dim = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::tensor_dim
 
using shape_type = bc::Dim< input_tensor_dim::value >
 
using input_tensor_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::type
 
using batched_input_tensor_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::batched_type
 
using output_value_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::value_type
 
using output_system_tag = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::system_tag
 
using output_allocator_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::allocator_type
 
using output_tensor_dim = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::tensor_dim
 
using output_shape_type = bc::Dim< output_tensor_dim::value >
 
using output_tensor_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::type
 
using batched_output_tensor_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::batched_type
 
- Public Types inherited from bc::nn::Layer_Output_Base< Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > >
using output_value_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::value_type
 
using output_value_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::value_type
 
using output_system_tag = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::system_tag
 
using output_system_tag = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::system_tag
 
using output_allocator_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::allocator_type
 
using output_allocator_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::allocator_type
 
using output_tensor_dim = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::tensor_dim
 
using output_tensor_dim = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::tensor_dim
 
using output_shape_type = bc::Dim< output_tensor_dim::value >
 
using output_shape_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::shape_type
 
using output_tensor_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::type
 
using output_tensor_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::tensor_type
 
using batched_output_tensor_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::batched_type
 
using batched_output_tensor_type = typename Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > ::batched_type
 
using next_layer_type = Layer_Input_Base< Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > >
 
using next_layer_type = Layer_Input_Base< Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > >
 

Public Member Functions

 LSTM (int inputs, bc::size_t outputs)
 
void randomize_weights ()
 
template<class X , class Y >
auto forward_propagation (const X &x, const Y &y, Cache &cache)
 
template<class X , class Y >
auto predict (const X &x, const Y &y, Cache &cache)
 
template<class X , class Y >
auto single_predict (const X &x, const Y &y, Cache &cache)
 
template<class X , class Y , class Delta >
auto back_propagation (const X &x, const Y &y, const Delta &delta_outputs, class Cache &cache)
 
void update_weights ()
 
virtual void set_learning_rate_hook (value_type lr) override final
 
virtual void set_batch_size_hook (int bs) override final
 
void zero_deltas ()
 
void zero_gradients ()
 
void clear_bp_storage (Cache &m_cache)
 
virtual void save (Layer_Loader &loader) const
 
virtual void save_from_cache (Layer_Loader &loader, const Cache &cache) const override
 
virtual void load (Layer_Loader &loader) override
 
virtual void load_to_cache (Layer_Loader &loader, const Cache &cache) override
 
void copy_training_data_to_single_predict (Cache &cache, int batch_index)
 
- Public Member Functions inherited from bc::nn::Layer_Base< LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >, Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > >
 Layer_Base (std::string classname, shape_type input_shape, output_shape_type output_shape)
 m_classname should be initialized by supplying __func__ to the first argument of the Layer_Base. More...
 
 Layer_Base (std::string classname, shape_type input_shape)
 
virtual ~Layer_Base ()
 
virtual output_shape_type get_output_shape () const
 
virtual shape_type get_input_shape () const
 
auto get_batched_input_shape () const
 
auto get_batched_output_shape () const
 
bc::size_t input_size () const
 
bc::size_t output_size () const
 
bc::size_t batch_size () const
 
bc::size_t batched_input_size () const
 
bc::size_t batched_output_size () const
 
void set_batch_size (int batch_size)
 
void set_learning_rate (value_type learning_rate)
 
auto get_learning_rate () const
 
auto get_batched_learning_rate () const
 
void copy_training_data_to_single_predict (Cache &, int batch_index)
 
void update_weights ()
 
void clear_bp_storage (Cache &)
 
const std::string & classname () const
 Returns the derived_classes class namepse. More...
 
std::string get_string_architecture () const
 
virtual std::string get_string_architecture_hook () const
 
auto default_input_tensor_factory () const
 
auto default_output_tensor_factory () const
 
auto default_batched_input_tensor_factory () const
 
auto default_batched_output_tensor_factory () const
 
- Public Member Functions inherited from bc::nn::Layer_Input_Base< Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > >
void set_prev (prev_layer_type &prev)
 
void set_prev (prev_layer_type &prev)
 
input_shape_type input_shape () const
 
input_shape_type input_shape () const
 
const prev_layer_typeprev_layer () const
 
prev_layer_typeprev_layer ()
 
const prev_layer_typeprev_layer () const
 
prev_layer_typeprev_layer ()
 
virtual ~Layer_Input_Base ()
 
virtual ~Layer_Input_Base ()
 
- Public Member Functions inherited from bc::nn::Layer_Output_Base< Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > >
void set_next (next_layer_type &next)
 
void set_next (next_layer_type &next)
 
output_shape_type output_shape () const
 
output_shape_type output_shape () const
 
const next_layer_typenext_layer () const
 
next_layer_typenext_layer ()
 
const next_layer_typenext_layer () const
 
next_layer_typenext_layer ()
 
virtual ~Layer_Output_Base ()
 
virtual ~Layer_Output_Base ()
 

Additional Inherited Members

- Static Public Member Functions inherited from bc::nn::Layer_Base< LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >, Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > >
static std::string parse_classname (std::string classname)
 
- Static Public Attributes inherited from bc::nn::Layer_Base< LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >, Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > >
static constexpr value_type default_learning_rate
 
- Protected Attributes inherited from bc::nn::Layer_Base< LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >, Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > >
shape_type m_input_shape
 
output_shape_type m_output_shape
 
- Protected Attributes inherited from bc::nn::Layer_Input_Base< Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > >
prev_layer_typem_prev_layer
 
input_shape_type m_input_shape
 
- Protected Attributes inherited from bc::nn::Layer_Output_Base< Tensor_Descriptor< ValueType, SystemTag, Integer< 1 > > >
next_layer_typem_next_layer
 
bc::Dim< output_tensor_dim::value > m_output_shape
 

Member Typedef Documentation

◆ allocator_type

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
using bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::allocator_type = nn_default_allocator_type<ValueType, SystemTag>

◆ backward_requires_outputs

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
using bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::backward_requires_outputs = std::true_type

◆ defines_predict

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
using bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::defines_predict = std::true_type

◆ defines_single_predict

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
using bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::defines_single_predict = std::true_type

◆ forward_requires_outputs

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
using bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::forward_requires_outputs = std::true_type

◆ greedy_evaluate_delta

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
using bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::greedy_evaluate_delta = std::true_type

◆ input_descriptor_t

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
using bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::input_descriptor_t = Tensor_Descriptor< ValueType, SystemTag, Integer<1> >

◆ is_recurrent

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
using bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::is_recurrent = std::true_type

◆ optimizer_type

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
using bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::optimizer_type = Optimizer

◆ parent_type

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
using bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::parent_type = Layer_Base< LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity>, input_descriptor_t>

◆ requires_extra_cache

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
using bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::requires_extra_cache = std::true_type

◆ system_tag

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
using bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::system_tag = SystemTag

◆ value_type

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
using bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::value_type = ValueType

Constructor & Destructor Documentation

◆ LSTM()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::LSTM ( int  inputs,
bc::size_t  outputs 
)
inline

Member Function Documentation

◆ back_propagation()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
template<class X , class Y , class Delta >
auto bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::back_propagation ( const X &  x,
const Y &  y,
const Delta &  delta_outputs,
class Cache cache 
)
inline

◆ clear_bp_storage()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
void bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::clear_bp_storage ( Cache m_cache)
inline

◆ copy_training_data_to_single_predict()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
void bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::copy_training_data_to_single_predict ( Cache cache,
int  batch_index 
)
inline

◆ forward_propagation()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
template<class X , class Y >
auto bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::forward_propagation ( const X &  x,
const Y &  y,
Cache cache 
)
inline

◆ load()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
virtual void bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::load ( Layer_Loader loader)
inlineoverridevirtual

◆ load_to_cache()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
virtual void bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::load_to_cache ( Layer_Loader loader,
const Cache cache 
)
inlineoverridevirtual

◆ predict()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
template<class X , class Y >
auto bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::predict ( const X &  x,
const Y &  y,
Cache cache 
)
inline

◆ randomize_weights()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
void bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::randomize_weights ( )
inline

◆ save()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
virtual void bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::save ( Layer_Loader loader) const
inlinevirtual

◆ save_from_cache()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
virtual void bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::save_from_cache ( Layer_Loader loader,
const Cache cache 
) const
inlineoverridevirtual

◆ set_batch_size_hook()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
virtual void bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::set_batch_size_hook ( int  bs)
inlinefinaloverridevirtual

◆ set_learning_rate_hook()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
virtual void bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::set_learning_rate_hook ( value_type  lr)
inlinefinaloverridevirtual

◆ single_predict()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
template<class X , class Y >
auto bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::single_predict ( const X &  x,
const Y &  y,
Cache cache 
)
inline

◆ update_weights()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
void bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::update_weights ( )
inline

◆ zero_deltas()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
void bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::zero_deltas ( )
inline

◆ zero_gradients()

template<class SystemTag , class ValueType , class Optimizer = Stochastic_Gradient_Descent, class ForgetGateNonlinearity = bc::Logistic, class WriteGateNonlinearity = bc::Tanh, class InputGateNonlinearity = bc::Logistic, class OutputGateNonlinearity = bc::Logistic, class CellStateNonLinearity = bc::Tanh>
void bc::nn::LSTM< SystemTag, ValueType, Optimizer, ForgetGateNonlinearity, WriteGateNonlinearity, InputGateNonlinearity, OutputGateNonlinearity, CellStateNonLinearity >::zero_gradients ( )
inline

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