Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
88864fe4
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
88864fe4
编写于
11月 07, 2018
作者:
K
kechxu
提交者:
Jiangtao Hu
12月 13, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prediction: more clear structure of cruise model
上级
fa160405
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
51 addition
and
9 deletion
+51
-9
modules/prediction/network/cruise_model/cruise_model.cc
modules/prediction/network/cruise_model/cruise_model.cc
+31
-0
modules/prediction/network/cruise_model/cruise_model.h
modules/prediction/network/cruise_model/cruise_model.h
+11
-0
modules/prediction/proto/cruise_model.proto
modules/prediction/proto/cruise_model.proto
+9
-9
未找到文件。
modules/prediction/network/cruise_model/cruise_model.cc
浏览文件 @
88864fe4
...
...
@@ -15,14 +15,45 @@
*****************************************************************************/
#include "modules/prediction/network/cruise_model/cruise_model.h"
#include "cyber/common/log.h"
namespace
apollo
{
namespace
prediction
{
namespace
network
{
using
apollo
::
prediction
::
CruiseModelParameter
;
void
CruiseModel
::
Run
(
const
std
::
vector
<
Eigen
::
MatrixXf
>&
inputs
,
Eigen
::
MatrixXf
*
output
)
const
{
// TODO(kechxu) implement
// Step 1: Run lane feature conv 1d
// Step 2: Run lane feature max pool 1d
// Step 3: Run lane feature avg pool 1d
// Step 4: Run obstacle feature fully connected
// Step 5: Concatenate [lane_feature, obstacle_feature]
// Step 6: Get classification result
// Step 7: Get regression result
// Step 8: Output
}
bool
CruiseModel
::
LoadModel
(
const
CruiseModelParameter
&
cruise_model_parameter
)
{
CHECK
(
cruise_model_parameter
.
has_lane_feature_conv
());
CHECK
(
cruise_model_parameter
.
has_lane_feature_maxpool
());
CHECK
(
cruise_model_parameter
.
has_lane_feature_avgpool
());
CHECK
(
cruise_model_parameter
.
has_obs_feature_fc
());
CHECK
(
cruise_model_parameter
.
has_classify
());
CHECK
(
cruise_model_parameter
.
has_regress
());
cruise_model_parameter_
.
CopyFrom
(
cruise_model_parameter
);
return
true
;
}
}
// namespace network
...
...
modules/prediction/network/cruise_model/cruise_model.h
浏览文件 @
88864fe4
...
...
@@ -30,6 +30,14 @@ namespace network {
class
CruiseModel
:
public
NetModel
{
public:
/**
* @brief Load cruise network parameters from a protobuf message
* @param CruiseModelParameter is a protobuf message
* @return True if successfully loaded, otherwise False
*/
bool
LoadModel
(
const
apollo
::
prediction
::
CruiseModelParameter
&
cruise_model_parameter
);
/**
* @brief Compute the model output from inputs according to a defined layers'
* flow
...
...
@@ -38,6 +46,9 @@ class CruiseModel : public NetModel {
*/
void
Run
(
const
std
::
vector
<
Eigen
::
MatrixXf
>&
inputs
,
Eigen
::
MatrixXf
*
output
)
const
override
;
private:
CruiseModelParameter
cruise_model_parameter_
;
};
}
// namespace network
...
...
modules/prediction/proto/cruise_model.proto
浏览文件 @
88864fe4
...
...
@@ -6,7 +6,7 @@ import "modules/prediction/proto/network_layers.proto";
// Intermediate building blocks:
message
LaneFeatureConv
{
message
LaneFeatureConv
Parameter
{
optional
Conv1dParameter
conv1d_0
=
1
;
optional
ActivationParameter
activation_1
=
2
;
optional
Conv1dParameter
conv1d_2
=
3
;
...
...
@@ -14,14 +14,14 @@ message LaneFeatureConv {
optional
Conv1dParameter
conv1d_4
=
5
;
}
message
ObsFeatureFC
{
message
ObsFeatureFC
Parameter
{
optional
DenseParameter
linear_0
=
1
;
optional
ActivationParameter
activation_1
=
2
;
optional
DenseParameter
linear_3
=
3
;
optional
ActivationParameter
activation_4
=
4
;
}
message
Classify
{
message
Classify
Parameter
{
optional
DenseParameter
linear_0
=
1
;
optional
ActivationParameter
activation_1
=
2
;
optional
DenseParameter
linear_3
=
3
;
...
...
@@ -32,7 +32,7 @@ message Classify {
optional
ActivationParameter
activation_10
=
8
;
}
message
Regress
{
message
Regress
Parameter
{
optional
DenseParameter
linear_0
=
1
;
optional
ActivationParameter
activation_1
=
2
;
optional
DenseParameter
linear_3
=
3
;
...
...
@@ -46,11 +46,11 @@ message Regress {
// Final model
message
CruiseModel
{
optional
LaneFeatureConv
lane_feature_conv
=
1
;
message
CruiseModel
Parameter
{
optional
LaneFeatureConv
Parameter
lane_feature_conv
=
1
;
optional
MaxPool1dParameter
lane_feature_maxpool
=
2
;
optional
AvgPool1dParameter
lane_feature_avgpool
=
3
;
optional
ObsFeatureFC
obs_feature_fc
=
5
;
optional
Classify
classify
=
6
;
optional
Regress
regress
=
7
;
optional
ObsFeatureFC
Parameter
obs_feature_fc
=
5
;
optional
Classify
Parameter
classify
=
6
;
optional
Regress
Parameter
regress
=
7
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录