bidirectional unit ///
More...
#include <Stack.h>
bidirectional unit ///
Definition at line 310 of file Stack.h.
◆ BidirectionalLayer()
lwtDev::BidirectionalLayer::BidirectionalLayer |
( |
std::unique_ptr< IRecurrentLayer > |
forward_layer, |
|
|
std::unique_ptr< IRecurrentLayer > |
backward_layer, |
|
|
const std::string & |
merge_mode, |
|
|
bool |
return_sequence |
|
) |
| |
bidirectional layer ///
Definition at line 611 of file Stack.cxx.
◆ ~BidirectionalLayer()
virtual lwtDev::BidirectionalLayer::~BidirectionalLayer |
( |
| ) |
|
|
inlinevirtual |
◆ scan()
MatrixXd lwtDev::BidirectionalLayer::scan |
( |
const MatrixXd & |
x | ) |
const |
|
overridevirtual |
Implements lwtDev::IRecurrentLayer.
Definition at line 623 of file Stack.cxx.
626 MatrixXd backward_rev;
628 backward_rev = backward.rowwise().reverse();
630 backward_rev = backward;
634 return forward.array()*backward_rev.array();
636 return forward.array() + backward_rev.array();
638 return (forward.array() + backward_rev.array())/2.;
640 MatrixXd concatMatr(forward.rows(), forward.cols()+backward_rev.cols());
641 concatMatr << forward, backward_rev;
645 "Merge mode "+
m_merge_mode+
"not implemented. Choose one of [mul, sum, ave, concat]");
◆ m_backward_layer
◆ m_forward_layer
◆ m_go_backwards
bool lwtDev::IRecurrentLayer::m_go_backwards = false |
|
inherited |
◆ m_merge_mode
std::string lwtDev::BidirectionalLayer::m_merge_mode |
|
private |
◆ m_return_sequence
bool lwtDev::IRecurrentLayer::m_return_sequence = false |
|
inherited |
The documentation for this class was generated from the following files: