apollo::prediction::network
More...
|
class | Activation |
| Activation is an activation network layer. Activation layer output is y = f(x), where x is the input, y the output and f the activation function. More...
|
|
class | AvgPool1d |
| AvgPool1d is the average Pool 1d network layer. More...
|
|
class | BatchNormalization |
|
class | Concatenate |
|
class | Conv1d |
| Conv1d is the convolution 1d network layer. Conv1d layer output is y = Conv(x, w), where x is the input, w the weight. More...
|
|
class | Dense |
| Dense is the forward fully connected network layer. Dense layer output is y = f(x*w + b), where x is the input, w the weight, b the bias and f the activation. More...
|
|
class | Flatten |
|
class | Input |
|
class | Layer |
| Layer is a base class for specific network layers It contains a pure virtual function Run which must be implemented in derived class. More...
|
|
class | LSTM |
| For a step-by-step description of the algorithm, see this tutorial. More...
|
|
class | MaxPool1d |
| MaxPool1d is the max Pool 1d network layer. More...
|
|
class | NetModel |
| NetModel is a base class for specific network model It contains a pure virtual function Run which must be implemented in derived class. More...
|
|
class | RnnModel |
| RnnModel is a derived class from NetModel, it has a specific layers structure. More...
|
|
|
float | sigmoid (const float x) |
| sigmoid function: f(x) = 1 / (1 + exp(-x)) More...
|
|
float | tanh (const float x) |
| hyperbolic tangent function: f(x) = (1 + exp(-2x)) / (1 - exp(-2x)) More...
|
|
float | linear (const float x) |
| linear function: f(x) = x More...
|
|
float | hard_sigmoid (const float x) |
| "hard" sigmoid function: | 0.0 x in (-oo, 0) f(x) = | 0.2x + 0.5 x in [0, 2.5] | 1.0 x in (2.5, +oo) More...
|
|
float | relu (const float x) |
| relu function: | 0.0 x in (-oo, 0.0) f(x) = | | x x in [0.0, +oo) More...
|
|
Eigen::MatrixXf | FlattenMatrix (const Eigen::MatrixXf &matrix) |
| flatten a matrix to a row vector More...
|
|
std::function< float(float)> | serialize_to_function (const std::string &str) |
| translate a string into a network activation function More...
|
|
bool | LoadTensor (const TensorParameter &tensor_pb, Eigen::MatrixXf *matrix) |
| load matrix value from a protobuf message More...
|
|
bool | LoadTensor (const TensorParameter &tensor_pb, Eigen::VectorXf *vector) |
| load vector value from a protobuf message More...
|
|
bool | LoadTensor (const TensorParameter &tensor_pb, std::vector< Eigen::MatrixXf > *const tensor3d) |
| load matrix value from a protobuf message More...
|
|
◆ FlattenMatrix()
Eigen::MatrixXf apollo::prediction::network::FlattenMatrix |
( |
const Eigen::MatrixXf & |
matrix | ) |
|
flatten a matrix to a row vector
- Parameters
-
- Returns
- Flattened matrix
◆ hard_sigmoid()
float apollo::prediction::network::hard_sigmoid |
( |
const float |
x | ) |
|
"hard" sigmoid function: | 0.0 x in (-oo, 0) f(x) = | 0.2x + 0.5 x in [0, 2.5] | 1.0 x in (2.5, +oo)
◆ linear()
float apollo::prediction::network::linear |
( |
const float |
x | ) |
|
linear function: f(x) = x
◆ LoadTensor() [1/3]
bool apollo::prediction::network::LoadTensor |
( |
const TensorParameter & |
tensor_pb, |
|
|
Eigen::MatrixXf * |
matrix |
|
) |
| |
load matrix value from a protobuf message
- Parameters
-
protobuf | message in the form of TensorParameter |
Eigen::MatrixXf | will be returned |
- Returns
- True if load data successively, otherwise False
◆ LoadTensor() [2/3]
bool apollo::prediction::network::LoadTensor |
( |
const TensorParameter & |
tensor_pb, |
|
|
Eigen::VectorXf * |
vector |
|
) |
| |
load vector value from a protobuf message
- Parameters
-
protobuf | message in the form of TensorParameter |
Eigen::VectorXf | will be returned |
- Returns
- True if load data successively, otherwise False
◆ LoadTensor() [3/3]
bool apollo::prediction::network::LoadTensor |
( |
const TensorParameter & |
tensor_pb, |
|
|
std::vector< Eigen::MatrixXf > *const |
tensor3d |
|
) |
| |
load matrix value from a protobuf message
- Parameters
-
protobuf | message in the form of TensorParameter |
vector | of Eigen::MatrixXf will be returned |
- Returns
- True if load data successively, otherwise False
◆ relu()
float apollo::prediction::network::relu |
( |
const float |
x | ) |
|
relu function: | 0.0 x in (-oo, 0.0) f(x) = | | x x in [0.0, +oo)
◆ serialize_to_function()
std::function<float(float)> apollo::prediction::network::serialize_to_function |
( |
const std::string & |
str | ) |
|
translate a string into a network activation function
- Parameters
-
- Returns
- activation function map to the string
◆ sigmoid()
float apollo::prediction::network::sigmoid |
( |
const float |
x | ) |
|
sigmoid function: f(x) = 1 / (1 + exp(-x))
◆ tanh()
float apollo::prediction::network::tanh |
( |
const float |
x | ) |
|
hyperbolic tangent function: f(x) = (1 + exp(-2x)) / (1 - exp(-2x))