Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Oneflow-Inc
oneflow
提交
88a40be1
O
oneflow
项目概览
Oneflow-Inc
/
oneflow
上一次同步 2 年多
通知
13
Star
2733
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oneflow
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
88a40be1
编写于
4月 20, 2017
作者:
W
willzhang4a58
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
concat op
上级
aab7c593
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
163 addition
and
67 deletion
+163
-67
CMakeLists.txt
CMakeLists.txt
+6
-1
oneflow/graph/boxing_task_node.cpp
oneflow/graph/boxing_task_node.cpp
+1
-1
oneflow/graph/logical_graph.cpp
oneflow/graph/logical_graph.cpp
+2
-2
oneflow/graph/model_load_task_graph.cpp
oneflow/graph/model_load_task_graph.cpp
+2
-2
oneflow/graph/model_save_task_graph.cpp
oneflow/graph/model_save_task_graph.cpp
+2
-2
oneflow/graph/model_update_task_graph.cpp
oneflow/graph/model_update_task_graph.cpp
+1
-1
oneflow/job/compiler.cpp
oneflow/job/compiler.cpp
+14
-7
oneflow/job/job_conf.proto
oneflow/job/job_conf.proto
+3
-1
oneflow/job/job_desc.cpp
oneflow/job/job_desc.cpp
+22
-0
oneflow/job/job_desc.h
oneflow/job/job_desc.h
+16
-9
oneflow/job/resource.proto
oneflow/job/resource.proto
+1
-1
oneflow/operator/boxing_op.cpp
oneflow/operator/boxing_op.cpp
+2
-2
oneflow/operator/clone_op.cpp
oneflow/operator/clone_op.cpp
+2
-2
oneflow/operator/concat_op.cpp
oneflow/operator/concat_op.cpp
+18
-0
oneflow/operator/concat_op.h
oneflow/operator/concat_op.h
+27
-0
oneflow/operator/convolution_op.cpp
oneflow/operator/convolution_op.cpp
+2
-2
oneflow/operator/copy_op.cpp
oneflow/operator/copy_op.cpp
+2
-2
oneflow/operator/data_loader_op.cpp
oneflow/operator/data_loader_op.cpp
+2
-2
oneflow/operator/innerproduct_op.cpp
oneflow/operator/innerproduct_op.cpp
+2
-2
oneflow/operator/multinomial_logistic_loss_op.cpp
oneflow/operator/multinomial_logistic_loss_op.cpp
+2
-2
oneflow/operator/op_conf.proto
oneflow/operator/op_conf.proto
+21
-13
oneflow/operator/operator_factory.cpp
oneflow/operator/operator_factory.cpp
+7
-7
oneflow/operator/pooling_op.cpp
oneflow/operator/pooling_op.cpp
+2
-2
oneflow/operator/relu_op.cpp
oneflow/operator/relu_op.cpp
+2
-2
oneflow/operator/softmax_op.cpp
oneflow/operator/softmax_op.cpp
+2
-2
未找到文件。
CMakeLists.txt
浏览文件 @
88a40be1
...
...
@@ -9,6 +9,9 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set
(
oneflow_src_dir
${
PROJECT_SOURCE_DIR
}
/oneflow
)
set
(
oneflow_cmake_dir
${
PROJECT_SOURCE_DIR
}
/cmake
)
# option
option
(
download_third_party
"Download and build all third party codes"
OFF
)
# Force to link static cxx runtime library
if
(
MSVC
)
foreach
(
flag_var
...
...
@@ -62,7 +65,9 @@ RELATIVE_PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS
add_library
(
of_protoobj
${
PROTO_SRCS
}
${
PROTO_HDRS
}
)
target_link_libraries
(
of_protoobj
${
oneflow_third_party_libs
}
)
add_dependencies
(
of_protoobj
${
oneflow_third_party_dependencies
}
)
if
(
download_third_party
)
add_dependencies
(
of_protoobj
${
oneflow_third_party_dependencies
}
)
endif
()
# cc obj lib
include_directories
(
${
oneflow_src_dir
}
)
...
...
oneflow/graph/boxing_task_node.cpp
浏览文件 @
88a40be1
...
...
@@ -120,7 +120,7 @@ void BoxingTaskNode::FwBuildChainSortedEdgesPair(
// Construct Op
OperatorConf
op_conf
;
op_conf
.
set_name
(
"TODO"
);
BoxingOpConf
*
box_conf
=
op_conf
.
mutable_boxing_
op_
conf
();
BoxingOpConf
*
box_conf
=
op_conf
.
mutable_boxing_conf
();
box_conf
->
set_lbn
(
lbn
);
box_conf
->
set_in_num
(
sorted_in_edges
.
size
());
box_conf
->
set_out_num
(
sorted_out_edges
.
size
());
...
...
oneflow/graph/logical_graph.cpp
浏览文件 @
88a40be1
...
...
@@ -87,8 +87,8 @@ void LogicalGraph::CollectCloneInfos(
// Construct clone op
OperatorConf
pb_op_conf
;
pb_op_conf
.
set_name
(
"clone_"
+
lbn
+
"_"
+
cur_node
->
node_id_str
());
pb_op_conf
.
mutable_clone_
op_
conf
()
->
set_out_num
(
edges
.
size
());
pb_op_conf
.
mutable_clone_
op_
conf
()
->
set_lbn
(
lbn
);
pb_op_conf
.
mutable_clone_conf
()
->
set_out_num
(
edges
.
size
());
pb_op_conf
.
mutable_clone_conf
()
->
set_lbn
(
lbn
);
auto
clone_op
=
ConstructOpFromPbConf
(
pb_op_conf
);
// Set clone_info
CloneInfo
clone_info
;
...
...
oneflow/graph/model_load_task_graph.cpp
浏览文件 @
88a40be1
...
...
@@ -9,12 +9,12 @@ void SetModelLoadChain(ChainNode* model_load_chain) {
// model load op
OperatorConf
op_conf
;
op_conf
.
set_name
(
""
);
op_conf
.
mutable_model_load_
op_
conf
();
op_conf
.
mutable_model_load_conf
();
model_load_chain
->
mut_op_vec
()
=
{
ConstructOpFromPbConf
(
op_conf
)};
// model load parallel_conf
ParallelConf
pr_conf
;
pr_conf
.
set_policy
(
kDataParallel
);
pr_conf
.
add_devices
(
JobDesc
::
Singleton
().
MdLoadM
achine
()
+
"/disk"
);
pr_conf
.
add_devices
(
JobDesc
::
Singleton
().
md_load_m
achine
()
+
"/disk"
);
model_load_chain
->
mut_parallel_desc
().
reset
(
new
ParallelDesc
(
pr_conf
));
// output
model_load_chain
->
mut_output_lbns
()
=
{
RegstDesc
::
kAllLbn
};
...
...
oneflow/graph/model_save_task_graph.cpp
浏览文件 @
88a40be1
...
...
@@ -8,12 +8,12 @@ void SetModelSaveChain(ChainNode* model_save_chain) {
// model save op
OperatorConf
op_conf
;
op_conf
.
set_name
(
""
);
op_conf
.
mutable_model_save_
op_
conf
();
op_conf
.
mutable_model_save_conf
();
model_save_chain
->
mut_op_vec
()
=
{
ConstructOpFromPbConf
(
op_conf
)};
// model save parallel_conf
ParallelConf
pr_conf
;
pr_conf
.
set_policy
(
kDataParallel
);
pr_conf
.
add_devices
(
JobDesc
::
Singleton
().
MdSaveM
achine
()
+
"/disk"
);
pr_conf
.
add_devices
(
JobDesc
::
Singleton
().
md_save_m
achine
()
+
"/disk"
);
model_save_chain
->
mut_parallel_desc
().
reset
(
new
ParallelDesc
(
pr_conf
));
// output
model_save_chain
->
mut_input_lbns
()
=
{
RegstDesc
::
kAllLbn
};
...
...
oneflow/graph/model_update_task_graph.cpp
浏览文件 @
88a40be1
...
...
@@ -18,7 +18,7 @@ void MdUpdtTaskGraph::BuildTaskGraph(const ChainNode* data_chain) {
// Construct ModelUpdateOp
OperatorConf
op_conf
;
op_conf
.
set_name
(
"model_update_"
+
data_chain
->
ConcatedOpsName
());
op_conf
.
mutable_model_update_
op_
conf
();
op_conf
.
mutable_model_update_conf
();
auto
model_update_op
=
ConstructOpFromPbConf
(
op_conf
);
// ModelUpdateChain
auto
chain_gph
=
make_unique
<
ChainGraph
>
();
...
...
oneflow/job/compiler.cpp
浏览文件 @
88a40be1
#include "gflags/gflags.h"
#include "glog/logging.h"
#include "job/id_manager.h"
#include "graph/task_graph_manager.h"
#include "job/job_conf.pb.h"
DEFINE_string
(
job_user_conf_filepath
,
""
,
""
);
using
oneflow
::
JobConf
;
using
oneflow
::
JobDesc
;
using
oneflow
::
IDMgr
;
using
oneflow
::
TaskGraphMgr
;
DEFINE_string
(
job_conf_filepath
,
""
,
""
);
int
main
(
int
argc
,
char
**
argv
)
{
gflags
::
ParseCommandLineFlags
(
&
argc
,
&
argv
,
true
);
oneflow
::
JobUserConf
job_user_conf
;
ParseProtoFromTextFile
(
FLAGS_job_user_conf_filepath
,
&
job_user_conf
);
oneflow
::
JobDesc
::
Singleton
().
InitFromJobUserConf
(
job_user_conf
);
oneflow
::
IDMgr
::
Singleton
().
InitFromResource
(
oneflow
::
JobDesc
::
Singleton
().
resource
());
oneflow
::
TaskGraphMgr
::
Singleton
().
Init
();
google
::
InitGoogleLogging
(
argv
[
0
]);
google
::
ParseCommandLineFlags
(
&
argc
,
&
argv
,
true
);
JobConf
job_conf
;
ParseProtoFromTextFile
(
FLAGS_job_conf_filepath
,
&
job_conf
);
JobDesc
::
Singleton
().
InitFromJobConf
(
job_conf
);
IDMgr
::
Singleton
().
InitFromResource
(
JobDesc
::
Singleton
().
resource
());
TaskGraphMgr
::
Singleton
().
Init
();
return
0
;
}
oneflow/job/job_conf.proto
浏览文件 @
88a40be1
...
...
@@ -5,8 +5,10 @@ import "job/dlnet_conf.proto";
import
"job/resource.proto"
;
import
"job/strategy.proto"
;
message
Job
User
Conf
{
message
JobConf
{
string
train_dlnet_conf_filepath
=
1
;
string
resource_filepath
=
2
;
string
strategy_filepath
=
3
;
string
model_load_machine
=
4
;
string
model_save_machine
=
5
;
}
oneflow/job/job_desc.cpp
0 → 100644
浏览文件 @
88a40be1
#include "job/job_desc.h"
#include "common/proto_io.h"
namespace
oneflow
{
void
JobDesc
::
InitFromJobConf
(
const
JobConf
&
conf
)
{
ParseProtoFromTextFile
(
conf
.
train_dlnet_conf_filepath
(),
&
train_dl_net_conf_
);
ParseProtoFromTextFile
(
conf
.
resource_filepath
(),
&
resource_
);
ParseProtoFromTextFile
(
conf
.
strategy_filepath
(),
&
strategy_
);
md_load_machine_
=
conf
.
model_load_machine
();
md_save_machine_
=
conf
.
model_save_machine
();
}
void
JobDesc
::
InitFromProto
(
const
JobDescProto
&
)
{
TODO
();
}
JobDescProto
JobDesc
::
ToProto
()
const
{
TODO
();
}
}
// namespace oneflow
oneflow/job/job_desc.h
浏览文件 @
88a40be1
...
...
@@ -17,20 +17,27 @@ class JobDesc final {
return
obj
;
}
void
InitFromJobUserConf
(
const
JobUserConf
&
)
{
TODO
();
}
void
InitFromProto
(
const
JobDescProto
&
)
{
TODO
();
}
JobDescProto
ToProto
()
const
{
TODO
();
}
void
InitFromJobConf
(
const
JobConf
&
);
void
InitFromProto
(
const
JobDescProto
&
);
JobDescProto
ToProto
()
const
;
const
DLNetConf
&
train_dlnet_conf
()
const
{
TODO
();
}
const
Resource
&
resource
()
const
{
TODO
();
}
const
Strategy
&
strategy
()
const
{
TODO
();
}
// Getters
const
DLNetConf
&
train_dlnet_conf
()
const
{
return
train_dl_net_conf_
;
}
const
Resource
&
resource
()
const
{
return
resource_
;
}
const
Strategy
&
strategy
()
const
{
return
strategy_
;
}
const
std
::
string
&
MdLoadMachine
()
{
TODO
()
;
}
const
std
::
string
&
MdSaveMachine
()
{
TODO
()
;
}
const
std
::
string
&
md_load_machine
()
{
return
md_load_machine_
;
}
const
std
::
string
&
md_save_machine
()
{
return
md_save_machine_
;
}
private:
JobDesc
()
=
default
;
DLNetConf
train_dl_net_conf_
;
Resource
resource_
;
Strategy
strategy_
;
std
::
string
md_load_machine_
;
std
::
string
md_save_machine_
;
};
}
// namespace oneflow
...
...
oneflow/job/resource.proto
浏览文件 @
88a40be1
...
...
@@ -13,7 +13,7 @@ enum DeviceType {
}
message
Resource
{
repeated
Machine
machine
s
=
1
;
repeated
Machine
machine
=
1
;
int64
device_num_per_machine
=
2
;
DeviceType
device_type
=
3
;
}
...
...
oneflow/operator/boxing_op.cpp
浏览文件 @
88a40be1
...
...
@@ -5,8 +5,8 @@ namespace oneflow {
void
BoxingOp
::
Init
(
const
OperatorConf
&
op_conf
)
{
mut_op_name
()
=
op_conf
.
name
();
CHECK
(
op_conf
.
has_boxing_
op_
conf
());
auto
cnf
=
new
BoxingOpConf
(
op_conf
.
boxing_
op_
conf
());
CHECK
(
op_conf
.
has_boxing_conf
());
auto
cnf
=
new
BoxingOpConf
(
op_conf
.
boxing_conf
());
mut_pb_op_conf
().
reset
(
cnf
);
for
(
int64_t
i
=
0
;
i
<
cnf
->
in_num
();
++
i
)
{
...
...
oneflow/operator/clone_op.cpp
浏览文件 @
88a40be1
...
...
@@ -5,8 +5,8 @@ namespace oneflow {
void
CloneOp
::
Init
(
const
OperatorConf
&
op_conf
)
{
mut_op_name
()
=
op_conf
.
name
();
CHECK
(
op_conf
.
has_clone_
op_
conf
());
auto
cnf
=
new
CloneOpConf
(
op_conf
.
clone_
op_
conf
());
CHECK
(
op_conf
.
has_clone_conf
());
auto
cnf
=
new
CloneOpConf
(
op_conf
.
clone_conf
());
mut_pb_op_conf
().
reset
(
cnf
);
EnrollInputBn
(
"in"
);
...
...
oneflow/operator/concat_op.cpp
0 → 100644
浏览文件 @
88a40be1
#include "operator/concat_op.h"
namespace
oneflow
{
void
ConcatOp
::
Init
(
const
OperatorConf
&
op_conf
)
{
mut_op_name
()
=
op_conf
.
name
();
CHECK
(
op_conf
.
has_concat_conf
());
auto
cnf
=
new
ConcatOpConf
(
op_conf
.
concat_conf
());
mut_pb_op_conf
().
reset
(
cnf
);
for
(
int
i
=
0
;
i
<
cnf
->
in_size
();
++
i
)
{
EnrollInputBn
(
"in_"
+
std
::
to_string
(
i
));
}
EnrollOutputBn
(
"out"
);
}
}
// namespace oneflow
oneflow/operator/concat_op.h
0 → 100644
浏览文件 @
88a40be1
#ifndef ONEFLOW_OPERATOR_CONCAT_OP_H_
#define ONEFLOW_OPERATOR_CONCAT_OP_H_
#include "operator/operator.h"
namespace
oneflow
{
class
ConcatOp
final
:
public
UserOperator
{
public:
OF_DISALLOW_COPY_AND_MOVE
(
ConcatOp
);
ConcatOp
()
=
default
;
~
ConcatOp
()
=
default
;
void
Init
(
const
OperatorConf
&
op_conf
)
override
;
std
::
string
normal_ibn2lbn
(
const
std
::
string
&
input_bn
)
const
override
{
TODO
();
}
void
InferShape4ObAndDtbFromIb
()
const
override
{
TODO
();
}
void
InferShape4Mtb
()
const
override
{
TODO
();
}
void
InferShape4Mdb
()
const
override
{
TODO
();
}
private:
};
}
// namespace oneflow
#endif // ONEFLOW_OPERATOR_CONCAT_OP_H_
oneflow/operator/convolution_op.cpp
浏览文件 @
88a40be1
...
...
@@ -6,8 +6,8 @@ namespace oneflow {
void
ConvolutionOp
::
Init
(
const
OperatorConf
&
op_conf
)
{
mut_op_name
()
=
op_conf
.
name
();
CHECK
(
op_conf
.
has_convolution_
op_
conf
());
auto
cnf
=
new
ConvolutionOpConf
(
op_conf
.
convolution_
op_
conf
());
CHECK
(
op_conf
.
has_convolution_conf
());
auto
cnf
=
new
ConvolutionOpConf
(
op_conf
.
convolution_conf
());
mut_pb_op_conf
().
reset
(
cnf
);
EnrollInputBn
(
"in"
);
...
...
oneflow/operator/copy_op.cpp
浏览文件 @
88a40be1
...
...
@@ -5,8 +5,8 @@ namespace oneflow {
void
CopyOp
::
Init
(
const
OperatorConf
&
op_conf
)
{
mut_op_name
()
=
op_conf
.
name
();
CHECK
(
op_conf
.
has_copy_
op_
conf
());
auto
cnf
=
new
CopyOpConf
(
op_conf
.
copy_
op_
conf
());
CHECK
(
op_conf
.
has_copy_conf
());
auto
cnf
=
new
CopyOpConf
(
op_conf
.
copy_conf
());
mut_pb_op_conf
().
reset
(
cnf
);
for
(
int64_t
i
=
0
;
i
<
cnf
->
copied_lbns_size
();
++
i
)
{
...
...
oneflow/operator/data_loader_op.cpp
浏览文件 @
88a40be1
...
...
@@ -6,8 +6,8 @@ namespace oneflow {
void
DataLoaderOp
::
Init
(
const
OperatorConf
&
op_conf
)
{
mut_op_name
()
=
op_conf
.
name
();
CHECK
(
op_conf
.
has_data_loader_
op_
conf
());
auto
cnf
=
new
DataLoaderOpConf
(
op_conf
.
data_loader_
op_
conf
());
CHECK
(
op_conf
.
has_data_loader_conf
());
auto
cnf
=
new
DataLoaderOpConf
(
op_conf
.
data_loader_conf
());
mut_pb_op_conf
().
reset
(
cnf
);
EnrollOutputBn
(
"data"
,
false
);
...
...
oneflow/operator/innerproduct_op.cpp
浏览文件 @
88a40be1
...
...
@@ -6,8 +6,8 @@ namespace oneflow {
void
InnerProductOp
::
Init
(
const
OperatorConf
&
op_conf
)
{
mut_op_name
()
=
op_conf
.
name
();
CHECK
(
op_conf
.
has_inner_product_
op_
conf
());
auto
cnf
=
new
InnerProductOpConf
(
op_conf
.
inner_product_
op_
conf
());
CHECK
(
op_conf
.
has_inner_product_conf
());
auto
cnf
=
new
InnerProductOpConf
(
op_conf
.
inner_product_conf
());
mut_pb_op_conf
().
reset
(
cnf
);
EnrollInputBn
(
"in"
);
...
...
oneflow/operator/multinomial_logistic_loss_op.cpp
浏览文件 @
88a40be1
...
...
@@ -6,9 +6,9 @@ namespace oneflow {
void
MultinomialLogisticLossOp
::
Init
(
const
OperatorConf
&
op_conf
)
{
mut_op_name
()
=
op_conf
.
name
();
CHECK
(
op_conf
.
has_multinomial_logistic_loss_
op_
conf
());
CHECK
(
op_conf
.
has_multinomial_logistic_loss_conf
());
auto
cnf
=
new
MultinomialLogisticLossOpConf
(
op_conf
.
multinomial_logistic_loss_
op_
conf
());
op_conf
.
multinomial_logistic_loss_conf
());
mut_pb_op_conf
().
reset
(
cnf
);
EnrollInputBn
(
"data"
);
...
...
oneflow/operator/op_conf.proto
浏览文件 @
88a40be1
...
...
@@ -37,6 +37,12 @@ message MultinomialLogisticLossOpConf {
string
loss
=
3
;
}
message
ConcatOpConf
{
repeated
string
in
=
1
;
string
out
=
2
;
int64
axis
=
3
;
}
message
CopyOpConf
{
enum
CopyType
{
H2D
=
0
;
...
...
@@ -46,6 +52,7 @@ message CopyOpConf {
repeated
string
copied_lbns
=
2
;
}
message
CloneOpConf
{
int64
out_num
=
1
;
string
lbn
=
2
;
...
...
@@ -85,18 +92,19 @@ message ModelSaveOpConf {
message
OperatorConf
{
string
name
=
1
;
oneof
specified_type
{
ConvolutionOpConf
convolution_op_conf
=
100
;
InnerProductOpConf
inner_product_op_conf
=
101
;
DataLoaderOpConf
data_loader_op_conf
=
102
;
PoolingOpConf
pooling_op_conf
=
103
;
ReluOpConf
relu_op_conf
=
104
;
SoftmaxOpConf
softmax_op_conf
=
105
;
MultinomialLogisticLossOpConf
multinomial_logistic_loss_op_conf
=
106
;
CopyOpConf
copy_op_conf
=
107
;
CloneOpConf
clone_op_conf
=
108
;
BoxingOpConf
boxing_op_conf
=
109
;
ModelUpdateOpConf
model_update_op_conf
=
110
;
ModelLoadOpConf
model_load_op_conf
=
111
;
ModelSaveOpConf
model_save_op_conf
=
112
;
ConvolutionOpConf
convolution_conf
=
100
;
InnerProductOpConf
inner_product_conf
=
101
;
DataLoaderOpConf
data_loader_conf
=
102
;
PoolingOpConf
pooling_conf
=
103
;
ReluOpConf
relu_conf
=
104
;
SoftmaxOpConf
softmax_conf
=
105
;
MultinomialLogisticLossOpConf
multinomial_logistic_loss_conf
=
106
;
CopyOpConf
copy_conf
=
107
;
CloneOpConf
clone_conf
=
108
;
BoxingOpConf
boxing_conf
=
109
;
ModelUpdateOpConf
model_update_conf
=
110
;
ModelLoadOpConf
model_load_conf
=
111
;
ModelSaveOpConf
model_save_conf
=
112
;
ConcatOpConf
concat_conf
=
113
;
}
}
oneflow/operator/operator_factory.cpp
浏览文件 @
88a40be1
...
...
@@ -15,31 +15,31 @@ std::shared_ptr<Operator> OperatorFactory::ConstructOp(
const
OperatorConf
&
op_conf
)
const
{
std
::
shared_ptr
<
Operator
>
ret
;
switch
(
op_conf
.
specified_type_case
())
{
case
OperatorConf
::
kConvolution
Op
Conf
:
{
case
OperatorConf
::
kConvolutionConf
:
{
ret
.
reset
(
new
ConvolutionOp
);
break
;
}
case
OperatorConf
::
kInnerProduct
Op
Conf
:
{
case
OperatorConf
::
kInnerProductConf
:
{
ret
.
reset
(
new
InnerProductOp
);
break
;
}
case
OperatorConf
::
kDataLoader
Op
Conf
:
{
case
OperatorConf
::
kDataLoaderConf
:
{
ret
.
reset
(
new
DataLoaderOp
);
break
;
}
case
OperatorConf
::
kPooling
Op
Conf
:
{
case
OperatorConf
::
kPoolingConf
:
{
ret
.
reset
(
new
PoolingOp
);
break
;
}
case
OperatorConf
::
kRelu
Op
Conf
:
{
case
OperatorConf
::
kReluConf
:
{
ret
.
reset
(
new
ReluOp
);
break
;
}
case
OperatorConf
::
kSoftmax
Op
Conf
:
{
case
OperatorConf
::
kSoftmaxConf
:
{
ret
.
reset
(
new
SoftmaxOp
);
break
;
}
case
OperatorConf
::
kMultinomialLogisticLoss
Op
Conf
:
{
case
OperatorConf
::
kMultinomialLogisticLossConf
:
{
ret
.
reset
(
new
MultinomialLogisticLossOp
);
break
;
}
...
...
oneflow/operator/pooling_op.cpp
浏览文件 @
88a40be1
...
...
@@ -6,8 +6,8 @@ namespace oneflow {
void
PoolingOp
::
Init
(
const
OperatorConf
&
op_conf
)
{
mut_op_name
()
=
op_conf
.
name
();
CHECK
(
op_conf
.
has_pooling_
op_
conf
());
auto
cnf
=
new
PoolingOpConf
(
op_conf
.
pooling_
op_
conf
());
CHECK
(
op_conf
.
has_pooling_conf
());
auto
cnf
=
new
PoolingOpConf
(
op_conf
.
pooling_conf
());
mut_pb_op_conf
().
reset
(
cnf
);
EnrollInputBn
(
"in"
);
...
...
oneflow/operator/relu_op.cpp
浏览文件 @
88a40be1
...
...
@@ -6,8 +6,8 @@ namespace oneflow {
void
ReluOp
::
Init
(
const
OperatorConf
&
op_conf
)
{
mut_op_name
()
=
op_conf
.
name
();
CHECK
(
op_conf
.
has_relu_
op_
conf
());
auto
cnf
=
new
ReluOpConf
(
op_conf
.
relu_
op_
conf
());
CHECK
(
op_conf
.
has_relu_conf
());
auto
cnf
=
new
ReluOpConf
(
op_conf
.
relu_conf
());
mut_pb_op_conf
().
reset
(
cnf
);
EnrollInputBn
(
"in"
);
...
...
oneflow/operator/softmax_op.cpp
浏览文件 @
88a40be1
...
...
@@ -6,8 +6,8 @@ namespace oneflow {
void
SoftmaxOp
::
Init
(
const
OperatorConf
&
op_conf
)
{
mut_op_name
()
=
op_conf
.
name
();
CHECK
(
op_conf
.
has_softmax_
op_
conf
());
auto
cnf
=
new
SoftmaxOpConf
(
op_conf
.
softmax_
op_
conf
());
CHECK
(
op_conf
.
has_softmax_conf
());
auto
cnf
=
new
SoftmaxOpConf
(
op_conf
.
softmax_conf
());
mut_pb_op_conf
().
reset
(
cnf
);
EnrollInputBn
(
"in"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录