Apollo 11.0
自动驾驶开放平台
net_util.cc 文件参考
#include "modules/prediction/network/net_util.h"
#include <unordered_map>
#include "cyber/common/log.h"
net_util.cc 的引用(Include)关系图:

浏览源代码.

命名空间

namespace  apollo
 class register implement
 
namespace  apollo::prediction
 apollo::prediction
 
namespace  apollo::prediction::network
 apollo::prediction::network
 

函数

float apollo::prediction::network::sigmoid (const float x)
 sigmoid function: f(x) = 1 / (1 + exp(-x))
 
float apollo::prediction::network::tanh (const float x)
 hyperbolic tangent function: f(x) = (1 + exp(-2x)) / (1 - exp(-2x))
 
float apollo::prediction::network::linear (const float x)
 linear function: f(x) = x
 
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)
 
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)
 
Eigen::MatrixXf apollo::prediction::network::FlattenMatrix (const Eigen::MatrixXf &matrix)
 flatten a matrix to a row vector
 
std::function< float(float)> apollo::prediction::network::serialize_to_function (const std::string &str)
 translate a string into a network activation function
 
bool apollo::prediction::network::LoadTensor (const TensorParameter &tensor_pb, Eigen::MatrixXf *matrix)
 load matrix value from a protobuf message
 
bool apollo::prediction::network::LoadTensor (const TensorParameter &tensor_pb, Eigen::VectorXf *vector)
 load vector value from a protobuf message
 
bool apollo::prediction::network::LoadTensor (const TensorParameter &tensor_pb, std::vector< Eigen::MatrixXf > *const tensor3d)
 load matrix value from a protobuf message