#include <Stack.h>
Definition at line 173 of file Stack.h.
◆ RecurrentStack() [1/2]
lwtDev::RecurrentStack::RecurrentStack |
( |
size_t |
n_inputs, |
|
|
const std::vector< LayerConfig > & |
layers |
|
) |
| |
Definition at line 271 of file Stack.cxx.
275 const size_t n_layers =
layers.size();
276 for (
size_t layer_n = 0; layer_n < n_layers; layer_n++) {
◆ ~RecurrentStack()
lwtDev::RecurrentStack::~RecurrentStack |
( |
| ) |
|
◆ RecurrentStack() [2/2]
◆ add_bidirectional_layers()
size_t lwtDev::RecurrentStack::add_bidirectional_layers |
( |
size_t |
n_inputs, |
|
|
const LayerConfig & |
layer |
|
) |
| |
|
private |
Definition at line 344 of file Stack.cxx.
347 if(
layer.sublayers.size() != 2)
351 size_t n_forward = 0;
354 size_t n_backward = 0;
362 std::unique_ptr<IRecurrentLayer> forward_layer(
m_layers.back());
372 std::unique_ptr<IRecurrentLayer> backward_layer(
m_layers.back());
373 backward_layer->m_go_backwards = (!forward_layer->m_go_backwards);
377 std::move(backward_layer),
379 layer.return_sequence));
◆ add_embedding_layers()
size_t lwtDev::RecurrentStack::add_embedding_layers |
( |
size_t |
n_inputs, |
|
|
const LayerConfig & |
layer |
|
) |
| |
|
private |
Definition at line 384 of file Stack.cxx.
386 for (
const auto& emb:
layer.embedding) {
387 size_t n_wt = emb.weights.size();
388 size_t n_cats = n_wt / emb.n_out;
391 n_inputs += emb.n_out - 1;
◆ add_gru_layers()
size_t lwtDev::RecurrentStack::add_gru_layers |
( |
size_t |
n_inputs, |
|
|
const LayerConfig & |
layer |
|
) |
| |
|
private |
◆ add_lstm_layers()
size_t lwtDev::RecurrentStack::add_lstm_layers |
( |
size_t |
n_inputs, |
|
|
const LayerConfig & |
layer |
|
) |
| |
|
private |
Definition at line 310 of file Stack.cxx.
312 auto& comps =
layer.components;
317 const bool& go_backwards =
layer.go_backwards;
318 const bool& return_sequence =
layer.return_sequence;
◆ n_outputs()
size_t lwtDev::RecurrentStack::n_outputs |
( |
| ) |
const |
◆ operator=()
◆ scan()
MatrixXd lwtDev::RecurrentStack::scan |
( |
MatrixXd |
inputs | ) |
const |
◆ m_layers
◆ m_n_outputs
size_t lwtDev::RecurrentStack::m_n_outputs |
|
private |
The documentation for this class was generated from the following files: